C Tutorial Main

Multiple Files
foo.h vs foo.c
Multiple #includes -- #pragma once



The execution of a C program begins with function named main(). All of the files and

libraries for the C program are compiled together to build a single program file. That file

must contain exactly one main() function which the operating system uses as the starting

point for the program. Main() returns an int which, by  convention, is 0 if the program

completed successfully and non-zero if the program exited due to some error condition.

This is just a convention which makes sense in shell oriented environments such as Unix

or DOS.

Want To Know more with

Video ???

Contact for more learning: webmaster@freehost7com