Home »
MCQs »
C++ MCQs
Which of the following statement can replace the if-else statement?
82. Which of the following statement can replace the if-else statement?
- while loop
- do-while loop
- for loop
- conditional operator
Answer: D) conditional operator
Explanation:
In C++, we can replace if-else statements using conditional operators.