Basic Structure of C- Program

The file name of c program must be with .c extension.

Note: Turbo c compiler (windows platform) follows ANSI C standard.

And GCC (LINUX platform) follows a C99 standard.

  • Definition of program present in libraries.
  • Function call present in our program.

A simple structure of C- program :




main( )


             local variables;

             program logic;




#include<stdio.h>               //header file


main()                                  //main function


int a;                        //local variable

printf(“enter a number :”);            //program logic

scanf(“%d \n”, a);

printf(” you’ve entered : %d “,a);







Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Powered by

Up ↑

%d bloggers like this: