If a semicolon is not used at the end of a statement, what message will be displayed by C++?

Options

  • A. Semicolon missing
  • B. Statement missing
  • C. Error in statements
  • D. More than one of the above
  • E. None of the above

Correct Answer (Detailed Explanation is Below)

E. None of the above

Detailed Explanation

Correct Answer: E — None of the above.

Explanation: A semicolon is required after many C++ statements. If it is omitted, the compiler generally reports a syntax error. The exact diagnostic message depends on the compiler and surrounding code.