Next: Review Questions Up: Nested if and if-else 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 final value of x if initially x has the value 1?
x
if (x >= 0) x += 5; else if (x >=5) x += 2;
What is the final value of x if initially x has the value 0?
if (x >= 0) x += 5; if (x >= 5) x += 2;
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.