Question:

A C++ line ends with which symbol ?

Show Hint

The semicolon in C++ is like the period at the end of a sentence in English. It signals the completion of a thought or command.
  • ;
  • !
  • ,
  • :
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is A

Solution and Explanation

Step 1: Recall the syntax of C++. C++ is a semi-colon-terminated language. This means that most individual statements (declarations, expressions, function calls, etc.) must end with a semicolon (`;`).
Step 2: Analyze the purpose of the semicolon. The semicolon acts as a statement terminator, telling the compiler where one statement ends and the next one begins. This allows for writing multiple statements on a single line or a single statement across multiple lines.
Was this answer helpful?
0
0