2. www.iies.in PH: +91 98869 20008 enquiry@iies.in
What is structure of c program?
A ‘C’ program basically consists of the following parts :
Preprocessor commands
Functions
Variables
Statements & Expressions
Comments
3. www.iies.in PH: +91 98869 20008 enquiry@iies.in
EXAMPLE PROGRAM OF C PROGRAM STRUCTURE
4. www.iies.in PH: +91 98869 20008 enquiry@iies.in
DESCRIPTION OF STRUCTURE OF A PROGRAM
The first line of the program #include <stdio.h> is a preprocessor command.
Which tells a C compiler to include stdio.h file before going to
actual compilation.
The next line int main() is the main function where the program execution begin.
The next line int a = 10; is the place where we are intializing a value in to a variable
and also explaining that which type of data we are storing ina variable.
The next line printf(..........) is another function available in C which causes the to
print the value we have given in a variable.
The next line return 0; terminates the main() function and returns the value 0.