Structure of C Program
The basic structure of C program is as follow:
|
Document Section :
It consists of set of comment lines which include name of a program, author name, creation date and other information.
Links Section (File) : It is used to link the required system libraries or header files(#include<header_file_name>) to excute a program.
Definition Section : It is used to define or set values to variables (#define variable_name value).
Global variable declaration Section : It is used to declare global or public variable (Before the main()) .
void main() : Used to start of actual C program. It includes two parts as declaration part and executable part.
Variable declaration section : Used to declare private variable. (In the main()).
Function declaration section : Used to declare functions of program from which we get required output.
Then, executable statements are placed for execution.Function definition section :
Used to define functions which are to be called from main().
Written by "Shojib"
No comments:
Post a Comment