
Selection Statements
Quiz
•
Computers
•
University
•
Practice Problem
•
Medium
MA. PANGALIMAN
Used 21+ times
FREE Resource
Enhance your content in a minute
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of the following best describes the role of selection statements in C++?
They define loops that execute repeatedly
They allow decision-making based on conditions
They specify the order of function calls in a program
They are only used for handling errors
2.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of the following is NOT a selection statement in C++?
if statement
switch statement
for loop
conditional operator ('?:')
3.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What will be the output of the following code if `x = 10`?
Greater than 5
Greater than 5 End
End
Compilation error
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of the following correctly represents a compound if statement?
if (x > 0) cout << "Positive"; cout << "Number";
if (x > 0) { cout << "Positive"; cout << "Number"; }
if x > 0 { cout << "Positive"; cout << "Number"; }
if (x > 0) cout << "Positive", cout << "Number";
5.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What will be the output if the user enters `15` in the following code?
Even
Odd
Compilation Error
No output
6.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which statement correctly implements an if-else structure?
7.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What is the output if `a = 20` in the following code?
A) A is large
B) A is medium
C) A is small
D) Compilation error
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
11 questions
Types of Mass Media
Quiz
•
10th Grade - Professi...
15 questions
Introducción Redes Tele1 IB
Quiz
•
10th Grade - University
10 questions
Creating tables in HTML
Quiz
•
University
20 questions
Spreadsheet Fundamentals - Quiz2
Quiz
•
University
10 questions
Hands-on Modul 3
Quiz
•
University
10 questions
Visual Basic 2010
Quiz
•
8th Grade - University
10 questions
CS100||MsWord
Quiz
•
University
20 questions
Skill Competition Quiz 2024
Quiz
•
10th Grade - 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
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th 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
