C Program Structure

C programming language so popular because it is reliable, simple and easy to use

C Program Structure

Structure of a C program basically consists of the following parts:

   Preprocessor Directives

   Functions

  Variables

   Statements & Expressions

   Comments



#include < stdio.h>
int main()
{
printf(“\n Hello, JMD Tutorial\n”);
return 0;
}

 #include is a preprocessor command, tells a C compiler to include stdio.h file .

 int main() is the main() is a pre-defined function .

 line /*…*/ comments in the program. standard prototype of printf function in C

 printf(…) is standard prototype of printf function in C programming language.

 return 0; exit the main() function and returns the value 0.



TOP