C - onditional Statements
Which statement best describes when to use
switch instead of if in C?switch instead of if in C?switch usageswitch works well when you compare one variable to many fixed values like 1, 2, 3.ifif is more flexible and can handle ranges or complex conditions, but switch is clearer for fixed values.switch is best for checking one variable against many fixed values. -> Option Aswitch for fixed values [OK]15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions