Problem Solving using C Language

0 of 77 lessons complete (0%)

Basics of Programming

Structure of a Program

#include<header file>
 
<return data type> main()				---- Function Name
{							---- Start of program
	…. 	      /* this is a simple function*/
	….						---- Program Statements
	….
}							----End of Programs

 #include- will insert header file, which is a collection of predefined functions.

 Return data type– It will tell the compiler that what kind of data (int, float, double, char, void) will be returned after the compilation of program.

 main()- It is a special functions used by C system or compiler to tell that what is the starting point of program. There can be only one main function in a program.

 /* */- This is used to comment a line to increase the understanding and readability

 { }- defines the body in which all the functions will be written.