answersLogoWhite

0

main refers to the entry point of an application. All programs must have a main() function that returns an integer to the calling program or script. The return value can be used for any purpose, but generally a non-zero negative value is used to indicate that an error occurred (zero meaning no error).

User Avatar

Wiki User

12y ago

Still curious? Ask our experts.

Chat with our AI personalities

TaigaTaiga
Every great hero faces trials, and you—yes, YOU—are no exception!
Chat with Taiga
FranFran
I've made my fair share of mistakes, and if I can help you avoid a few, I'd sure like to try.
Chat with Fran
LaoLao
The path is yours to walk; I am only here to hold up a mirror.
Chat with Lao
More answers

This is the function that the programs begins execution when it starts.

A computer program needs to specify the location where execution of the program is to begin. Assembler languages generally allow specification of an entry point for a program. High level languages use as a starting point the only program or program file that is not specified as a subroutine, function, or subprogram. Since all code in C is a function or subroutine, the way to specify the starting entry point of an executable is by using the name "main".

When the "main" module is combined with other modules and library entries using link, ld, bind, iewl, or whatever the systems calls its linking utility, the created program (executable or load module) will have the routine labeled "main" marked as its starting entry point.

User Avatar

Wiki User

8y ago
User Avatar

Add your answer:

Earn +20 pts
Q: What significance is attached to the name main?
Write your answer...
Submit
Still have questions?
magnify glass
imp