O'Reilly logo

Just Enough C/C++ Programming by Guy W. Lecky-Thompson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Entry and Exit Points

A computer begins to execute a C program with the main function. It is in this part of the code that you set up the program context and begin the tasks that are required of the application. Some small programs will contain only a main function and others might contain the main function as a place to start and stop the application, with the bulk of the work done elsewhere.

In any C program without a main function, the program will not compile or be able to do anything useful. The exact declaration of the main function will vary from platform to platform, but for the purposes here, the standard declaration is used. This is because you are writing C programs that will work anywhere that the ANSI standard is supported with ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required