Check what you learned about bool, comparisons and if.
bool
if
1. What does std::cout << (10 < 11); print?
std::cout << (10 < 11);
2. Which of these values become true when stored in a bool?
true
-1
false
0
42
3. Which operator checks whether two values are equal?
==
=
<>
=>
4. With age equal to 10, what does if (age > 10) { std::cout << "A"; } else { std::cout << "B"; } print?
age
if (age > 10) { std::cout << "A"; } else { std::cout << "B"; }
A
B
AB
5. What is 10 >= 10?
10 >= 10
6. What does // do in a line of code?
//