
CPP Midterm
Authored by John Oli
Computers
University
Used 6+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
111 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
What will be the output of the following code?
A
B
C
None of the above
2.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
What will be the output of the following code?
Compilation error
A
B
Runtime error
3.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
What is the value of x after the following code is executed?
0
1
2
3
4.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
Which of the following is not a valid C++ comparison operator?
==
=
>=
!=
5.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
What is the correct way to comment out a single line in C++?
// This is a comment
/* This is a comment */
' This is a comment
# This is a comment
6.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
Given the following code, what is the value of result?
3
13
8
40
7.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
Which of the following statements is true about the --- if-else --- statement in C++?
An if-else statement can have multiple else blocks.
An if-else statement can only have one if block.
The else block is optional.
if-else statements can only be used for numerical comparisons.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
109 questions
C Programming Quiz
Quiz
•
University
110 questions
Quiz on Error! Bookmark not defined.
Quiz
•
University
111 questions
Untitled Quiz
Quiz
•
University
108 questions
1122
Quiz
•
University
115 questions
MIS 1-5
Quiz
•
University
112 questions
Router Functions and IP Address Classes
Quiz
•
University
110 questions
AT~4
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade