A1: The basic structure of C program is as follow:
Documentation
Section: It includes basic details of this program in comments.
Link
Section: It includes header files from the library files e.g.
#include<stdio.h>.
Definition
Section: It includes define constant like #define PI 3.14.
Global
Declaration Section: This section is used to declare global
variables.
main()
Section: It is the entry point of every C programs.
{
Declaration
Section: Here we declare variables to be used in program.
Executable
Section: Here we execute logic of the program.
}
Sub-program
Section: This section contains all the user define function.
function1()
{ function1() body}
function2()
{ function2() body}
Single line comment starts
with ‘//’.
Multi line comment
start with ‘/*’ and end with ‘*/’.