MC (TCO
4)
What
is the
result
of 5
% 7?
(7
points)
Week 12, Final Attempt 3(Current Exam)
0
2
5
7
Instructor Explanation:Malik, pages 39–40
MC(TCO 4) A variable declared before and outside all function blo
...
MC (TCO
4)
What
is the
result
of 5
% 7?
(7
points)
Week 12, Final Attempt 3(Current Exam)
0
2
5
7
Instructor Explanation:Malik, pages 39–40
MC(TCO 4) A variable declared before and outside all function blocks(7
points)
Week 12, Final Attempt 3(Current Exam)
is visible only in main.
is visible to all functions.
is visible to all functions except main.
is not visible to any functions.
Instructor Explanation:Malik, pages 50–65
MC(TCO 4) What is the value of data after the following code
executes?
unsigned char data = 0xA5;
data = data & 0xF0;(7 points)
Week 12, Final Attempt 3(Current Exam)
0xA0
0xF0
0xF5
0x5A
Instructor Explanation:Malik, pages 32–42
MC(TCO 4) What is the bit pattern in data after the following statements
execute?
unsigned int data = 10;
data = data | 0x0B;
data = data << 1;(7 points)
Week 12, Final Attempt 3(Current Exam)
0x314
0x154
0x342
0x156
Instructor Explanation:Malik, pages 32–42
MC(TCO 4) Why does this code snipper give a compile error?
int loopCounter = 0;
int numberOfScores = 20;
while (loopcounter < numberOfScores)
cout << “\nInside the loop”;(7 points)
Week 12, Final Attempt 3(Current Exam)
The value of the control loop control variable does not change the loop body.
The curly brackets are missing around the loop body.
The loopCounter variable is not spelled consistently.
All of the above
Instructor Explanation:Malik, pages 32–42
MC(TCO 4) Which of the following is not a C++ logical operator?(7 points) Week 12, Final Attempt 3(Current Exam)
#
&&
││
!
Instructor Explanation:Malik, pages 57–67
MC(TCO 4) What is the value of i after the following code fragment
executes?
int i = 2;
int k = 5 ;
i *= k + 1;(7 points)
Week 12, Final Attempt 3(Current Exam)
7
11
12
14
Instructor Explanation:Malik, pages 57–67
MC(TCO 4) Which looping statement is best if the number of iterations
is known?(7 points)
Week 12, Final Attempt 3(Current Exam)
If/Else
For
While
Do/While
Instructor Explanation:Malik, pages 57–67
[Show More]