🎴 Flashcard Mode
Programming Languages and Database Technologies
Card1 / 19
Mastered0
Review0
QuestionClick to flip
Which is the best example of ternary operator if 'a' is an integer variable?
AnswerClick to flip back
A
(a == 1) ? 20: 30
💡 Explanation:
It is similar to if else. In this code the if the value is equal to 1 than the condition is satisfied and 20 will be output else 30.