Why main function is special give two reasons?



Why main function is special give two reasons?..

Answer / Puja Jaiswal

The main function in C is special for several reasons: 1) It serves as the entry point of a C program, allowing the execution to start from that specific function. 2) The main function has no explicit return type, it can return an integer value which allows the operating system to know if the program executed successfully (return 0) or unsuccessfully (return non-zero).

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

what are non standard function in c

1 Answers  


a sequence of bytes with one to one corrspondence to those in the external device a) sequential addressing b) address c) byte code d) none

1 Answers  


Explain what are preprocessor directives?

1 Answers  


What are the various types of control structures in programming?

1 Answers  


What is the restrict keyword in C?

2 Answers  


different between overloading and overriding

3 Answers  


List the difference between a While & Do While loops?

1 Answers   Accenture,


Is both getch() and getchar() functions are similar? if it is similar means why these two functions are used for same usage? if it is not similar means what is the difference?

1 Answers   Infosys,


What is the heap?

1 Answers  


What are global variables and explain how do you declare them?

1 Answers  


What functions are used in dynamic memory allocation in c?

1 Answers  


How is a two dimensional array passed to function when the order of matrix is not known at complie time?

1 Answers   CSC,


Categories