Ternary Operators
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 output |
Post a Comment