Which of the following characters is a terminal that terminates a statement in…
2018
Which of the following characters is a terminal that terminates a statement in C++?
- A.
Semicolon (;)
- B.
Colon (:)
- C.
Ampersand (&)
- D.
Dollar ($)
Attempted by 308 students.
Show answer & explanation
Correct answer: A
In C++, every executable statement must end with a semicolon (;). This symbol signals the compiler that the command is complete before proceeding to the next line of code.