answersLogoWhite

0

Why main function c contained?

User Avatar

Anonymous

13y ago
Updated: 8/20/2019

1..Every program start with main().

2. Compiler firstly compile line main().

3. At least one fuction in C language.

4. Syntax of function

returntype functionname(parameter/arguments)

{

body

}

int main(void)

{

printf("Hello");

}

Sachin bhardwaj

skbmca@gmail.com

9868547722

User Avatar

Wiki User

13y 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


What is function in c language?

A function is a self contained block of code that perform of particular task.


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


Is main a predefined function in c?

yes


What is the only function all C plus plus programs must contain?

Every C plus plus program that is a main program must have the function 'main'.


Where void main is called in c?

main() is the function from where the execution starts.


Is c program works without main function?

yes a C program can work without a main() function. Though its not the normal C code that you would be writing on ur gcc or turbo C compiler. for example Linux Source code ... does not have a main() function : for details u can visit: http://samarthonweb.blogspot.com/2009/08/c-programe-with-no-main-function.html