which header file contains main() function in c?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is there any possibility to create customized header file with c programming language?

818


4-Take two sets of 5 numbers from user in two arrays. Sort array 1 in ascending and array 2 in descending order. Perform sorting by passing array to a function mySort(array, sortingOrder). Then multiply both the arrays returned from function, using metric multiplication technique in main. Print result in metric format.

1953


Why we not create function inside function.

1958


What is a pointer variable in c language?

833


Write a program to know whether the input number is an armstrong number.

891


Are comments included during the compilation stage and placed in the EXE file as well?

867


What is a char in c?

754


The file stdio.h, what does it contain?

881


A function can make the value of a variable available to another by a) declaring the variable as global variable b) Passing the variable as a parameter to the second function c) Either of the two methods in (A) and (B) d) binary stream

913


Which is better between malloc and calloc?

891


Hello. How to write a C program to check and display president party like if i type in the console "biden" and hit enter the output shoud be : "biden is democrat" and if i type "trump" and hit enter the output shoud be: "trump is republican"

1810


Why do we use pointer to pointer in c?

801


What does do in c?

783


why return type of main is not necessary in linux

1874


Do character constants represent numerical values?

1068