The Importance of the main() Function in C Programming

All C language programs must have a main() function. It's the core of every program. The “main ()” function indicates the beginning of a C++ program is executed, the control goes directly to the main() function. The statements within this function are the main body of the C++ program.  If main() function is not indicated, the program is not compiled and an error message is generated. It contains instructions that tell the computer to carry out whatever task your program is designed to do. But it's not officially required to do anything. The main() function uses its parentheses to contain any information typed after the program name at the command prompt. This is useful for more advanced programming. The name main is special, in that the main is actually the one which is run when your program is used. A C program is made up of a large number of functions. Each of these is given a name by the programmer and the refer to each other as the program run.


  1. Hey there, You have done a fantastic job. I will certainly digg it and personally suggest to my friends. I’m confident they’ll be benefited from this website.
    C Programming Courses in Chennai

  2. Hi! Thanks for the great information you havr provided! You have touched on crucuial points!

    Digital Marketing Training In India


Post a Comment

any suggestion on my side