Question: /Be careful!!!!! int num = 7; while (num < 10); { num++; } cout < < num; Displays 7 Displays 9 Displays 10 Displays 8
/Be careful!!!!! int num = 7; while (num < 10); { num++; } cout << num;
| Displays 7 |
| Displays 9 |
| Displays 10 |
| Displays 8 |
| Displays Nothing |
Flag this Question
Question 2
Given the following code, what value will num have after the loop?: int num = 10; while (num < 12) { num+=2; }
| 14 |
| 13 |
| 12 |
| 11 |
| 10 |
Flag this Question
Question 3
How many times will "Let us C" display? int i = 0; while (i <= 10) { cout << "Let us C" << endl; i++; }
| 11 |
| 10 |
| 9 |
| 0 |
| None due to a syntax error |
Flag this Question
Question 4
Given this code, what will display? int i = 0; while (i == 10) { cout << "Let us C" << endl; i++; }
| Let us C one time. |
| Let us C infinitely. |
| Nothing, you will get a syntax error. |
| It runs, but nothing displays |
| Nothing, you get a runtime error because i is 0 not 10. |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
