Next: Review Questions Up: The switch statement Previous: Summary
Try to answer as many of the following Multi-choice questions as you can.
Do not panic if you make any errors. You can always start again by clicking on the "Restart" button, located at the bottom.
Please enter your full name :
What is the value of the variable c after the switch statement below?
c
switch
x = 3; switch ( x ) { case 1: c = 'A'; break; case 2: c = 'B'; break; case 3: c = 'C'; break; default: c = 'F'; break; }
A
B
C
F
Once you have completed all the questions, and are quite happy with your answers. Then click on the "Submit Answers" button.
Clicking the "Restart" button will clear all your answers, ready to re-enter them.