+1 vote
5.6k views
asked in C++ by (4k points)

Why main function is special in C++ ?

1 Answer

0 votes
answered by (8.2k points)

Whenever a C++ program is executed, execution of the program starts and ends at main(). The main is the driver function of the program. If it is not present in a program, no execution can take place.

commented by
But a Java program works without a main function
commented by (8.2k points)
I totally agree but the question why main special in c++
commented by
this question is meant for c,c++

Categories

...