Header Responsive Ads

Ternary Operators

ternary or conditional operators in c++

Ternary operators are also called conditional operators or comparison operators or relational operators. These operators are used to check whether a certain condition is true or false. There are six types of conditional operators in C++

  • < (Symbol for less than)
  • > (Symbol for greater than)
  • <= (Less than or equal to symbol)
  • >= (Greater than equal to symbol
  • == (Equal to Symbol)
  • != (Not equal to)

C++ Program to get two numbers from the user and use all conditional operators

ternary operator
Ternary operator
ternary operator output
Ternary operator output

Post a Comment

Previous Post Next Post

In Article Ads 1 Before Post

In Article Ads 2 After Post