MCQs > IT & Programming > C++ > What is the ternary operator equivalent to this code snippet? if(x) y=a; else y=b;

C++ MCQs

What is the ternary operator equivalent to this code snippet? if(x) y=a; else y=b;

Answer

Correct Answer: Y=x?a:b;

Explanation:

Note: This Question is unanswered, help us to find answer for this one

C++ Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

C++ Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it