&What; is displayed by the C statements at the right if the value input is 3? sc
ID: 3842128 • Letter: #
Question
&What; is displayed by the C statements at the right if the value input is 3? scanf ("sd", &n;); a. Equal if (n 5) Less printf ("Equal "); Greater else if (n 5) no output printf ("Less "); else printf ("Greater n"); 9. What is displayed by the C statements that follow if the value input is 2? scan f (''sd'', &ctl;) switch (ctl) case 0: case 1: printf ("red case 2: printf ("blue case 3: printf ("green case 4: printf ("yellow") printf ("In"); a. red blue green d. yellow e. blue green yellowExplanation / Answer
1.Option d
It displays no output as there is no respective condition given in which the value input is 3. So it doesnot follows the less,greater and equal conditions in the above options.
2.Option b
If the input value is 2, the value displayed will be blue. As it is a switch case, it goes to the case number 2, when the respective choice is given as an input and displays the value as blue.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.