0
is main() in c/c++ a function or a class?
also explain how it is so?
2 Answers
+ 1
It is a function, the main function. You can recognise a function because of its () parameters
0
It's a function, and it is also the entry point for C/C++ programs. By definition, a C/C++ function should have a declaration consists of name, return type, and parameters. As you can see, "main()" contains a function name and empty parameter "()". main() often return integer as status notification to outside world.