(TCO 3) Given the following code and flag = 2, what is the value of x after the code executes? int x = 0; switch (flag) { case 0: x++; break; case 1: case 2: x++; case 3: x++; break; case 4: x++; case 5: case 6: x++; case 7: x++; break; default: break; } (Points : 5) A: x will be 0. B: x will be 1. C: x will be 2. D. x will be 3. Question 2. 2. (TCO 8) Which is the command used to open a file? (Points : 5) A: ifstream myFile;
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 1 | 2 | 3 | 4 | 5 |