Jack has written a C++ program, but when he tries to run it, nothing appears on the screen. What could be missing in his main function?

  • #include directive
  • cout << "Hello, World!" << endl; statement
  • int main() function
  • return 0; statement
Jack might be missing the cout << "Hello, World!" << endl; statement within his main() function. Without this line, nothing will be displayed on the screen when he runs the program.
Add your answer
Loading...

Leave a comment

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