Download presentation
Presentation is loading. Please wait.
1
Welcome to Who Wants to be a Millionaire
50:50 15 $1 Million 14 $500,000 Welcome to Who Wants to be a Millionaire 13 $250,000 12 $125,000 11 $64,000 10 $32,000 9 $16,000 8 $8,000 7 $4,000 6 $2,000 5 $1,000 4 $500 3 $300 2 $200 1 $100
2
Another Presentation © 2000 - All rights Reserved Mark E. Damon
4
15 $1 Million 14 $500,000 13 $250,000 12 $125,000 11 $64,000 10 $32,000 9 $16,000 8 $8,000 7 $4,000 6 $2,000 5 $1,000 4 $500 3 $300 2 $200 1 $100
5
The answer is C. 15 $1 Million 14 $500,000 13 $250,000 10 20.7 12
Suppose that x is an int variable and y is a double variable and the input is: Choose the values after the following statement executes: cin >> x >> y; 13 $250,000 12 $125,000 11 $64,000 10 $32,000 9 $16,000 8 $8,000 7 $4,000 The answer is C. 6 $2,000 5 $1,000 4 $500 3 $300 2 $200 50:50 1 $100 A: x = 10, y = 20 B: x = 10, y = 20.0 C: x = 10, y = 20.7 D: x = 10, y = 21.0
6
15 $1 Million 14 $500,000 13 $250,000 12 $125,000 11 $64,000 10 $32,000 9 $16,000 8 $8,000 7 $4,000 6 $2,000 5 $1,000 4 $500 3 $300 2 $200 1 $100
7
The answer is A. 15 $1 Million 14 $500,000 13 $250,000 12 $125,000 11
Suppose that x is an int variable, y is a double variable and ch is a char variable and the input is: 15A 73.2 Choose the values after the following statement executes: cin >> x >> ch >> y; 13 $250,000 12 $125,000 11 $64,000 10 $32,000 9 $16,000 8 $8,000 7 $4,000 The answer is A. 6 $2,000 5 $1,000 4 $500 3 $300 2 $200 50:50 1 $100 A: x = 15, ch = 'A', y = 73.2 B: x = 15, ch = 'A', y = 73.0 C: x = 15, ch = 'a', y = 73.0 D: This statement results in an error because there is no space between 15 and A.
8
15 $1 Million 14 $500,000 13 $250,000 12 $125,000 11 $64,000 10 $32,000 9 $16,000 8 $8,000 7 $4,000 6 $2,000 5 $1,000 4 $500 3 $300 2 $200 1 $100
9
The answer is B. 15 $1 Million 14 $500,000 13 $250,000 276. 12
Suppose that x is an int variable, ch is a char variable, and the input is: 276. Choose the values after the following statement executes: cin >> ch >> x; 14 $500,000 13 $250,000 12 $125,000 11 $64,000 10 $32,000 9 $16,000 8 $8,000 7 $4,000 The answer is B. 6 $2,000 5 $1,000 4 $500 3 $300 2 $200 50:50 1 $100 B: ch = '2', x = 76 A: ch = '2', x = 276 C: ch = ' ', x = 276 D: ch = 'b', x = 76
10
15 $1 Million 14 $500,000 13 $250,000 12 $125,000 11 $64,000 10 $32,000 9 $16,000 8 $8,000 7 $4,000 6 $2,000 5 $1,000 4 $500 3 $300 2 $200 1 $100
11
The answer is C. 15 $1 Million 14 $500,000 13 $250,000 12 $125,000 11
Suppose that alpha is an int variable and ch is a char variable and the input is: 17 A What are the values after the following statements execute? cin >> alpha; cin >> ch; 14 $500,000 13 $250,000 12 $125,000 11 $64,000 10 $32,000 9 $16,000 8 $8,000 7 $4,000 The answer is C. 6 $2,000 5 $1,000 4 $500 3 $300 2 $200 50:50 1 $100 A: alpha = 17, ch = ' ' B: alpha = 1, ch = ‘7' C: alpha = 17, ch = 'A' D: alpha = 17, ch = 'a'
12
15 $1 Million 14 $500,000 13 $250,000 12 $125,000 11 $64,000 10 $32,000 9 $16,000 8 $8,000 7 $4,000 6 $2,000 5 $1,000 4 $500 3 $300 2 $200 1 $100
13
The answer is C. 15 $1 Million 14 $500,000 13 $250,000 12 $125,000 11
Suppose that x is an int variable, y is a double variable, z is an int variable, and the input is: Choose the values after the following statement executes: cin >> x >> y >> z; 14 $500,000 13 $250,000 12 $125,000 11 $64,000 10 $32,000 9 $16,000 8 $8,000 7 $4,000 The answer is C. 6 $2,000 5 $1,000 4 $500 3 $300 2 $200 50:50 1 $100 A: x = 15, y = 76, z = 14 B: x = 15, y = 76, z = 0 C: x = 15, y = 76.3, z = 14 D: x = 15.0, y = 76.3, z = 14.0
14
You’ve Reached the $1,000 Milestone! Congratulations! Congratulations!
15
15 $1 Million 14 $500,000 13 $250,000 12 $125,000 11 $64,000 10 $32,000 9 $16,000 8 $8,000 7 $4,000 6 $2,000 5 $1,000 4 $500 3 $300 2 $200 1 $100
16
The answer is A. 15 $1 Million 14 $500,000 13 $250,000 12 $125,000 11
Suppose that x and y are int variables, z is a double variable, and the input is: Choose the values of x, y, and z after the following statement executes: cin >> x >> y >> z; $500,000 13 $250,000 12 $125,000 11 $64,000 10 $32,000 9 $16,000 8 $8,000 7 $4,000 The answer is A. 6 $2,000 5 $1,000 4 $500 3 $300 2 $200 50:50 1 $100 A: x = 28, y = 32, z = 0.6 B: x = 28, y = 32, z = 12.0 C: x = 28, y = 12, z = 32.6 D: x = 28, y = 12, z = 0.6
17
15 $1 Million 14 $500,000 13 $250,000 12 $125,000 11 $64,000 10 $32,000 9 $16,000 8 $8,000 7 $4,000 6 $2,000 5 $1,000 4 $500 3 $300 2 $200 1 $100
18
D: This statement results in input failure
15 $1 Million Suppose that x and y are int variables, ch is a char variable, and the input is: 4 2 A 12 Choose the values of x, y, and ch after the following statement executes: cin >> x >> ch >> y; 14 $500,000 13 $250,000 12 $125,000 11 $64,000 10 $32,000 9 $16,000 8 $8,000 7 $4,000 The answer is D. 6 $2,000 5 $1,000 4 $500 3 $300 2 $200 50:50 1 $100 A: x = 4, ch = ‘2’, y = 12 B: x = 4, ch = ‘A’, y = 12 D: This statement results in input failure C: x = 4, ch = ‘ ‘, y = 2
19
15 $1 Million 14 $500,000 13 $250,000 12 $125,000 11 $64,000 10 $32,000 9 $16,000 8 $8,000 7 $4,000 6 $2,000 5 $1,000 4 $500 3 $300 2 $200 1 $100
20
15 $1 Million 14 Suppose that ch1, ch2, and ch3 are variables of the type char and the input is: A B C Choose the value of ch3 after the following statement executes: cin >> ch1 >> ch2 >> ch3; $500,000 13 $250,000 12 $125,000 11 $64,000 10 $32,000 9 $16,000 8 $8,000 7 $4,000 The Answer is C. 6 $2,000 5 $1,000 4 $500 3 $300 2 $200 50:50 1 $100 B: 'B' A: 'A' C: 'C' D: '\n'
21
15 $1 Million 14 $500,000 13 $250,000 12 $125,000 11 $64,000 10 $32,000 9 $16,000 8 $8,000 7 $4,000 6 $2,000 5 $1,000 4 $500 3 $300 2 $200 1 $100
22
The answer is A. 15 $1 Million 14 $500,000 13 $250,000 12 $125,000 11
Suppose that ch1 and ch2 are char variables, alpha is an int variable, and the input is: A 18 What are the values after the following statement executes? cin.get(ch1); cin.get(ch2); cin >> alpha; 14 $500,000 13 $250,000 12 $125,000 11 $64,000 10 $32,000 9 $16,000 8 $8,000 7 $4,000 The answer is A. 6 $2,000 5 $1,000 4 $500 3 $300 2 $200 50:50 1 $100 A: ch1 = 'A', ch2 = ' ', alpha = 18 B: ch1 = 'A', ch2 = '1', alpha = 8 C: ch1 = 'A', ch2 = ' ', alpha = 1 D: ch1 = 'A', ch2 = '\n', alpha = 1
23
15 $1 Million 14 $500,000 13 $250,000 12 $125,000 11 $64,000 10 $32,000 9 $16,000 8 $8,000 7 $4,000 6 $2,000 5 $1,000 4 $500 3 $300 2 $200 1 $100
24
The answer is B. 15 $1 Million 14 $500,000 13 $250,000 12 $125,000 11
Suppose that ch1, ch2, and ch3 are variables of the type char and the input is: A B C What is the value of ch3 after the following statements execute? cin.get(ch1); cin.get(ch2); cin.get(ch3); $500,000 13 $250,000 12 $125,000 11 $64,000 10 $32,000 9 $16,000 8 $8,000 7 $4,000 The answer is B. 6 $2,000 5 $1,000 4 $500 3 $300 2 $200 50:50 1 $100 A: 'A' B: 'B' C: 'C' D: '\n'
25
You’ve Reached the $32,000 Milestone! Congratulations!
26
15 $1 Million 14 $500,000 13 $250,000 12 $125,000 11 $64,000 10 $32,000 9 $16,000 8 $8,000 7 $4,000 6 $2,000 5 $1,000 4 $500 3 $300 2 $200 1 $100
27
The answer is C. 15 $1 Million 14 $500,000 13 $250,000 12 $125,000 11
Suppose that alpha, beta, and gamma are int variables and the input is: What is the value of gamma after the following statements execute? cin >> alpha; cin.ignore(100, '\n'); cin >> beta; cin.ignore(100,'\n'); cin >> gamma; 14 $500,000 13 $250,000 12 $125,000 11 $64,000 10 $32,000 9 $16,000 8 $8,000 7 $4,000 The answer is C. 6 $2,000 5 $1,000 4 $500 3 $300 2 $200 50:50 1 $100 A: 100 B: 200 C: 300 D: 320
28
15 $1 Million 14 $500,000 13 $250,000 12 $125,000 11 $64,000 10 $32,000 9 $16,000 8 $8,000 7 $4,000 6 $2,000 5 $1,000 4 $500 3 $300 2 $200 1 $100
29
The answer is A. 15 $1 Million 14 $500,000 13 $250,000 12 $125,000 11
Suppose that ch1 and ch2 are char variables and the input is: WXYZ What is the value of ch2 after the following statements execute? cin.get(ch1); cin.putback(ch1); cin >> ch2; 14 $500,000 13 $250,000 12 $125,000 11 $64,000 10 $32,000 9 $16,000 8 $8,000 7 $4,000 The answer is A. 6 $2,000 5 $1,000 4 $500 3 $300 2 $200 50:50 1 $100 A: W B: Y C: X D: Z
30
15 $1 Million 14 $500,000 13 $250,000 12 $125,000 11 $64,000 10 $32,000 9 $16,000 8 $8,000 7 $4,000 6 $2,000 5 $1,000 4 $500 3 $300 2 $200 1 $100
31
The answer is B. 15 $1 Million 14 $500,000 13 $250,000 12 $125,000 11
Suppose that ch1 and ch2 are char variables and the input is: WXYZ What is the value of ch2 after the following statements execute? cin >> ch1; ch2 = cin.peek(); cin >> ch2; 14 $500,000 13 $250,000 12 $125,000 11 $64,000 10 $32,000 9 $16,000 8 $8,000 7 $4,000 The answer is B. 6 $2,000 5 $1,000 4 $500 3 $300 2 $200 50:50 1 $100 A: W B: X C: Y D: Z
32
15 $1 Million 14 $500,000 13 $250,000 12 $125,000 11 $64,000 10 $32,000 9 $16,000 8 $8,000 7 $4,000 6 $2,000 5 $1,000 4 $500 3 $300 2 $200 1 $100
33
The answer is A. 15 $1 Million 14 $500,000 13 $250,000 12 $125,000 11
Suppose that x = 55.68, y = , and z = What is the output of the following statements? cout << fixed << showpoint; cout << setprecision(3); cout << x << ' ' << y << ' ' << setprecision(2) << z << endl; 14 $500,000 13 $250,000 12 $125,000 11 $64,000 10 $32,000 9 $16,000 8 $8,000 7 $4,000 The answer is A. 6 $2,000 5 $1,000 4 $500 3 $300 2 $200 50:50 1 $100 A: B: D: C:
34
15 $1 Million 14 $500,000 13 $250,000 12 $125,000 11 $64,000 10 $32,000 9 $16,000 8 $8,000 7 $4,000 6 $2,000 5 $1,000 4 $500 3 $300 2 $200 1 $100
35
15 $1 Million Which of the following will cause a logical error if you are attempting to compare x to 5? 14 $500,000 13 $250,000 12 $125,000 11 $64,000 10 $32,000 9 $16,000 8 $8,000 7 $4,000 The answer is B. 6 $2,000 5 $1,000 4 $500 3 $300 2 $200 50:50 1 $100 A: if (x == 5) B: if (x = 5) C: if (x <= 5) D: if (x >= 5)
36
YOU WIN $1 MILLION DOLLARS!
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.