answersLogoWhite

0

Why there is one main function in c?

User Avatar

Anonymous

12y ago
Updated: 8/20/2019

Because that's what is executed when you run the program.

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

Main function in c?

The main function defines the entry point of an application in C.


Who is calling main function in c?

in c main function initailly called by operating system.


What is main function used in c?

if you do not used main function in c program when errors are accrued


Is main a keyword?

No. Main is not a keyword in C or C++. However, your program, when linked, must provide one and only one externally scoped entry point to main(). If you use main in some other context, and you do not provide one and only one entry point main(), then your program will not link nor run.


What must every c program have?

A main function must be present in every C program.


What is the main function of C?

The main function is the entry point for the application. Each program written in C or C++ will start at the first line in the main function, and cease execution once the main function returns control to the operating system (either via a return keyword in the main function, an exit(3) function call, or by "running off" the end of the main function). A program will not compile if it is missing the main function. Some variants of C++ have an alternate entry point (including those written for Microsoft Windows).


Why you use main function in c?

Because if you donot use main function in c program, the compiler willnot execute the program.C compiler starts execution from main function itself.


Can you use main function as a recursive function in C?

Yes


Can a function be called from more than one place in a program in c plus plus?

In C and C++, as well as in many (all?) languages, a function can be called from more than one place in a program. That's the purpose of functions - to encapsulate pieces of code that are needed in more than one place in the program.


Where does the main function starts and end in c program?

The entry point of a C program is the main function.The function signature might be like one of these:1. int main (void)2. int main (int argc, char *argv[])


Write a program in C without any functions?

It is not possible. In C, any program must have at least one function to be able to compile and execute properly: the function main()


Is main a predefined function in c?

yes