 |
|
 |
 |
 |
 |
 |
|
|
|
|
|
Practice Test 2
There are 20 questions
in this quiz
Question 1: Multiple Choice
Which of the following statements is false about data-types
in C++:
Question 2: Multiple Choice 
Combining object code with any other object files
and/or library files that may be necessary to make a stand-alone executable
file is carried out by the...
Question 3: Multiple Choice 
Which of the following statements is false?
Question 4: Multiple Choice 
Which one of the following statements is false?
Question 5: Multiple Choice 
Which one of the following produces an integer result?
Question 6: Multiple Choice
The function atoi() returns the type:
Question 7: Multiple Choice
An #include directive
instucts the...
Question 8: Multiple Choice
Which library file is needed for sending and receiving
keyboard input?
Question 9: Multiple Choice
What output is produced by the code shown below?
const
int MAX = 5;
int
x = 12;
x
-= MAX;
cout
<< x;
Question 10: Multiple Choice
Which one of the following comments about the evaluated
expression is incorrect?
Question 11: Multiple Choice
What output is produced by the code shown below?
const
char LETTER = 'B';
int
x = LETTER;
cout
<< x + 2;
Question 12: Multiple Choice
Which line of code produces a compiler error?
1.
const char LETTER = 'd';
2. int
x = 3;
3. LETTER = x + 1;
4. cout
<< LETTER;
Question 13: Multiple Choice
What output is produced by the code shown below?
char
LETTER = 'a';
LETTER
+= 2;
cout
<< LETTER;
Question 14: Multiple Choice
Which one of the following logical expressions returns FALSE?
Question 15: Multiple Choice
What output is produced
by the following code?
int
x = 12, y = 5;
if
(x > 12) {
if
( x < 15)
cout
<< "BLUE";
}
else
if ( y > 4)
cout
<< "GREEN";
else
cout
<< "YELLOW";
cout
<< "EGGS";
Question 16: Multiple Choice
What output is produced
by the following code?
if
('10' != '12'
- 2 || 'A' < 'B')
cout
<< "YES";
else
cout
<< "NO";
Question 17: Multiple Choice
What output is produced by the following code?
char
ch;
for
(int i = 0; i >=-3; i--){
ch
= 67 + i;
cout
<< ch << ",";
}
Question 18: Multiple Choice
What is the last line of output is produced
by the following code?
for
(int i = 1, k = 1; i <= 8; i += 2, k++)
cout
<< i*k << endl;
Question 19: Multiple Choice
Which one of the following is a post-conditional
loop?
Question 20: Multiple Choice
Which one of the following is a loop construct which
will always be executed at least once?
|
|
|