In C++, the conditional operator ______ is a ternary operator.

  • ?:
  • if-else
  • switch
  • while
In C++, the conditional operator "?:" is commonly known as the ternary operator. It is a shorthand way to write conditional expressions and is often used to assign values based on a condition. The operator takes three operands: a condition, a value if the condition is true, and a value if the condition is false.
Add your answer
Loading...

Leave a comment

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