Which of the following statements correctly starts a C++ program?

  • int begin() { }
  • int main() { }
  • int start() { }
  • void main() { }
The correct statement to start a C++ program is "int main() { }." In C++, the main function is defined with the return type "int," and it serves as the entry point for program execution. It can also accept command-line arguments within its parentheses.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *