Computer Science · C Programming
Which of the following statements is NOT true about the ternary operator (?:) in C/C++?
- 1It requires exactly three operands to evaluate.
- 2It evaluates an expression and returns a value based on whether the condition is true or false.
- 3It functions as a shorthand notation for a simple conditional assignment.
- 4It can replace all structural if-else blocks, including those containing nested loops and multiple statements.✓
Correct answer
It can replace all structural if-else blocks, including those containing nested loops and multiple statements.
Download Single Question PDF
Save this question and verified answer as a clean study sheet with live clickable link.
Share with Friends & Study Groups
Challenge your peer aspirants on WhatsApp or Telegram to solve this question!
Preparing for Computer Science?
Practice full-length mock tests with real exam timers, instant score analysis, and all-India ranking.
Want more practice questions on C Programming?
Solve complete topic-wise tests with detailed solutions on GkGet.
Related Practice Questions
Recommended practice questions in Computer Science · C Programming