Next: Exercises Up: Further Assignment Statements & Previous: Summary

Multiple Choice Questions

Specialized Assignment Statements


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.


Your Details


Please enter your full name :


The Questions


Q1.

Consider the following section of C++ program, in which i and n are int variables

 
n = 7;
i = 4;
i = n++;
 
What are the values of i and n ? i=7 n=8
i=7 n=7
i=8 n=8
i=4 n=7

Q2.

Consider the following section of C++ program, in which i and n are int variables

 
n = 5;
i = 9;
i = --n;
 
What are the values of i and n ? i=9 n=5
i=4 n=4
i=4 n=5
i=5 n=4


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.


Please send any comments about this page 



Next: Exercises Up: Further Assignment Statements & Previous: Summary