Concept

Where does execution begin in a C program?

ComputerScienceOne / The cmain() Function

"15.2.4. The main() Function Every executable program starts its execution somewhere. In C, the starting point is the main() function. When a program is compiled to an executable and the program is invoked, the code in the main() function starts executing. In our example, the code between the two curly brackets defines the main() function. At the end of the function we have a return statement. We’ll examine return statements in detail when we examine functions. The program is “returning” a zero value to the operating system. The convention in C is that zero indicates “no error occurred” while a non-zero value is used to indicate that “some” error occurred (the value used is determined by system standards such as the Portable Operating System Interface (POSIX) standard)."

Related Ideas

Where does execution begin in a C program? | ComputerScienceOne | Bifalgorithm | Bifalgorithm