manishnips.blogspost.com

main

main() function in C

 1. main() function is the entry point of any C program. 
2. It is the point at which execution of program is started. 
3. When a C program is executed, the execution control goes directly to the main() function. 
4. Every C program have a main() function.


Syntax of Main Function in C

 void main()
 {
  .........
  .........In above syntax;
  • void: is a keyword in C language, void means nothing, whenever we use void as a function return type then that function nothing return. here main() function no return any value.
  • In place of void we can also use int return type of main() function, at that time main() return integer type value.
  • main: is a name of function which is predefined function in C library.
Previous
Next Post »