dear friends plz clarify my doubt
we know that there are three aspects regarding function
1.function declaration
2.function call
3.function definition
in c,c++ program at the start we write
main()
{
...;
...;
}
now my question is
is this a function declaration or definition or calling?
if it is a function call why don't we give semicolon after main
since often we write function call as
Ex.
swap();
add();
then why not main();
we know that there are three aspects regarding function
1.function declaration
2.function call
3.function definition
in c,c++ program at the start we write
main()
{
...;
...;
}
now my question is
is this a function declaration or definition or calling?
if it is a function call why don't we give semicolon after main
since often we write function call as
Ex.
swap();
add();
then why not main();
Comment