Using the main() Function's Format
The cornerstone of every C program is the main() function. Because main() is a func tion and not a command, the trailing parentheses are required. A C function, just like a Visual Basic procedure, is a section of code that does something. main() is required because execution of a C program always begins in its main() function. Programmers use main() to control the rest of the program. main() often includes a series of proce dure calls. (All procedures in C are known as function procedures ; you'll learn more about C functions in the section "C Functions," later in this chapter.)
The actual code for main(), as with all C functions you write, begins after the opening brace, {, and main() continues until the closing ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access