Next: Review Questions Up: Conditions Previous: Summary

Multiple Choice Questions

Conditions


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.

What values can a relational expression take?

true and false
Any numerical value

Q2.

What values does C++ use to represent true and false ?

1 and 0
Any numerical value

Q3.

If a is 5, b is 10, c is 15 and d is 0 what are the truth values of the following expressions?

c == a+b
a != 7
b <=a
a > 5
a+d >= c-b
d/a < c*b

Q4.

If a is 5, b is 10, c is 15 and d is 0 what are the truth values of the following expressions?

c == a+b || c == d
a != 7 &amp;&amp; c >= 6 || a+c <= 20
!(b <= 12) &amp;&amp; a % 2 == 0
!(a >5) || c < a+b


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: Review Questions Up: Conditions Previous: Summary