Multiple choice

Which of the following is the conditional operator in C++?

  1. ==

  2. <

  3. ?

  4. None of these

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The conditional operator is a ternary operator which requires three operands depending upon the condition specified. We also specify values to be assigned to the left-hand variable if the condition is true or false.