CPP Midterm

Quiz
•
Computers
•
University
•
Hard
John Oli
Used 4+ times
FREE Resource
35 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.
Create a free account and access millions of resources
Similar Resources on Wayground
30 questions
Python Mock

Quiz
•
University
39 questions
CS Recape 2

Quiz
•
11th Grade - University
40 questions
C++ Basics

Quiz
•
University
30 questions
C-Language Q1

Quiz
•
University
37 questions
PL/SQL Advanced knowledge

Quiz
•
University
30 questions
CS 211 - Midterm Review

Quiz
•
University
35 questions
CodeChef (Secret Snippet)

Quiz
•
University
33 questions
Micro:bit & Makecode Scavenger Hunt

Quiz
•
6th Grade - University
Popular Resources on Wayground
55 questions
CHS Student Handbook 25-26

Quiz
•
9th Grade
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
10 questions
Chaffey

Quiz
•
9th - 12th Grade
15 questions
PRIDE

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
22 questions
6-8 Digital Citizenship Review

Quiz
•
6th - 8th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade