Main Funtion is a function from where the execution of the program starts. It is the first function that is called to perform other operation like calling of other functions etc.
Every C++ program must contain a main function. This means that a main function is a mendatory and necessary funtion and an important one.
Syntax:-
return_type main ()
{
// body
}
return_type can be void, int, float, char & double. By default the return type of main function is int (integer)
Every C++ program must contain a main function. This means that a main function is a mendatory and necessary funtion and an important one.
Syntax:-
return_type main ()
{
// body
}
return_type can be void, int, float, char & double. By default the return type of main function is int (integer)
0 comments:
Post a Comment