Why is the function main() special?



Why is the function main() special?..

Answer / Jagrit Kashyap

The main() function in C++ is considered the entry point of a program's execution. The compiler automatically searches for a main() function when compiling, and it serves as the starting point from which all other functions are called.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

What is auto used for in c++?

1 Answers  


What are structs in c++?

1 Answers  


What are the strengths of C++?

1 Answers  


Why should you learn c++?

1 Answers  


Which one of the following describes characteristics of "protected" inheritance? a) The base class has access only to the public or protected members of the derived class. b) The derived class has non-public, inheritable, access to all but the private members of the base class. c) The derived class has access to all members of the base class. d) The private members of the base class are visible within the derived class. e) Public members of the derived class are privately accessible from the base class.

4 Answers   Quark,


Why do we use string in c++?

1 Answers  


Differentiate between a deep copy and a shallow copy?

1 Answers  


What is a linked list in c++?

1 Answers  


Generally variables are stored in heap memory. When he variables are created in stack?

4 Answers   Persistent,


Is it possible for the objects to read and write themselves?

1 Answers  


If horse and bird inherit virtual public from animal, do their constructors initialize the animal constructor? If pegasus inherits from both horse and bird, how does it initialize animal’s constructor?

1 Answers  


What is the difference between while and do while loop? Explain with examples.

1 Answers  


Categories