Score for this quiz: 84 out of 150
Submitted Jul 23 at 10:32am
This attempt took 26 minutes.
***READ BEFORE CONTINUING***
If you have completed Attempt #1 and scored less than 60%, you may continue with Attempt #2. Y
...
Score for this quiz: 84 out of 150
Submitted Jul 23 at 10:32am
This attempt took 26 minutes.
***READ BEFORE CONTINUING***
If you have completed Attempt #1 and scored less than 60%, you may continue with Attempt #2. You
are disallowed for Attempt #2 if you scored 60% or higher in the Attempt #1.
If you have an incomplete Attempt #1, DO NOT continue.
This exam has 25 pooled multiple choice questions that cover High Level Programming, subject area
(CO 2).
Two hours have been allotted for the exam.
Remember to submit your exam when you are finished.
Good luck!
By submitting this work, I am attesting that it abides by the Student Honor Code
(https://devryu.instructure.com/courses/899/pages/student-honor-coded) .
Question 1 0 / 6 pts
(TCO 2) What is wrong with the following switch statement?
switch(x)
High-Level Programming Test: Attempt 2: Technology Integration II 9/3/17, 12)15 PM
https://devryu.instructure.com/courses/5409/quizzes/27665?headless=1 Page 2 of 18
{
case 0:
cout << x;
case 2:
cout << 2 / x;
break;
default:
cout << “error”;
break;
}
The value of x could be something other than 1 or 2.
There is no break statement for case 1. Correct Answer
There is no semicolon after the closing bracket.
All of the above You Answered
Remediation: Malik, pages 264–270
Question 2 0 / 6 pts
(TCO 2) Which of the following expressions is correct if you want to end a
while loop when the character variable keepgoing is anything other
than character y in either uppercase or lowercase?
while (keepgoing == "y" || keepgoing == "Y")
while (keepgoing == 'y' && keepgoing == 'Y') You Answered
High-Level Programming Test: Attempt 2: Technology Integration II 9/3/17, 12)15 PM
https://devryu.instructure.com/courses/5409/quizzes/27665?headless=1 Page 3 of 18
while (keepgoing == "y" || keepgoing == "Y")
while (keepgoing == 'y' || keepgoing == 'Y') Correct Answer
Remediation: Malik, pages 233–244
Question 3 6 / 6 pts
(TCO 2) For a switch statement, which of the following case statement
expressions is invalid or logically incorrect?
case 1 < x < 100;
case 'B'|'b';
case a23.45
All of the above Correct!
Remediation: Malik, pages 175–187
Question 4 0 / 6 pts
(TCO 2) Why does this code snippet give a compile error?
High-Level Programming Test: Attempt 2: Technology Integration II 9/3/17, 12)15 PM
https://devryu.instructure.com/courses/5409/quizzes/27665?headless=1 Page 4 of 18
int loopCounter = 0;
numberOfScores = 20;
while (loopcounter < numberOfScores)
cout << “\nInside the loop”;
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. Correct Answer
All of the above You Answered
Remediation: Malik, pages 32–42
Question 5 6 / 6 pts
(TCO 2) Which looping statement is best if the number of iterations is known?
[Show More]