which header file contains main() function in c?
Answers were Sorted based on User's Feedback
Answer / raj
Please if u don't know answer then don't post comment..
Please search stdio.h file
it doesn't contain main function declaration
thanks
Is This Answer Correct ? | 36 Yes | 0 No |
Answer / m3th0d
main() doesn't require any header file,
header files are not the part of C language they just
provides the means of accessing input/output and other
utilities.
int main()
{
int a=10;
return 0;
}
can be compiled without including any header file :)
Is This Answer Correct ? | 35 Yes | 3 No |
doesn't require any header file in function main(),
Because nothing else calls main. It is the entry point for
execution.
Is This Answer Correct ? | 11 Yes | 1 No |
Answer / reshma pawar
main is not included in any header file
It is just neaming convention for starting
the execution of program and main is not reserved
word also
Is This Answer Correct ? | 7 Yes | 0 No |
Answer / sarita
main is not included in any header file
It is generally the first user-written function run when a
program starts .
main() is a function called by another function, which is
the start-routine. This routine is created by the compiler .
If you can write your own compiler, then you can think of
changing main() to your name itself!
ANSI compliant compilers need main() as the starting point.
Is This Answer Correct ? | 6 Yes | 2 No |
Answer / mnr
header files does not contain main function.header files contains only input output functions and etc....
main is used for a indication of starting program.header files are checked before main execution.those are preprocessors.
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / tejas
main is the only function which is called from outside of the program. the code for invoking the main function is written inside something called as a "startup code". this startup code contains the prototype of main function. the main function is "called" from within this startup code which then is linked by linker to its definition created by the programmer. The linker, as we know, is responsible for linking object code to lib code. Along with these two codes, it also links startup code to create the executable file.
Is This Answer Correct ? | 0 Yes | 1 No |
Taking an example,differentiate b/w loader and linker ?
What is malloc calloc and realloc in c?
In this assignment you are asked to write a multithreaded program to find the duplicates in an array of 10 million integers. The integers are between -5000,000 to 5000,000 and are generated randomly. Use 10 threads, each thread works on 1000,000 integers. Compare the time needed to accomplish the task with single thread of execution program. Do not include the time to fill the array with integers in the execution time.
What is the use of the sizeof operator?
what is the structure?
What is the real time usage volatile?
what is the difference between : func (int list[], ...) or func (int *list , ....) - what is the difference if list is an array and if also if list is a pointer
How does selection sort work in c?
7. Identify the correct argument for the function call fflush() in ANSI C: A)stdout B)stdin C)stderr D)All the above
How can you draw circles in C?
What is the most efficient way to count the number of bits which are set in an integer?
what is the function of void main()?