
Selection Statements

Quiz
•
Computers
•
University
•
Medium
MA. PANGALIMAN
Used 19+ times
FREE Resource
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
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
C Quest 2.0

Quiz
•
University
20 questions
AWD - Prelim Quiz

Quiz
•
University
10 questions
Recitation Mathematical Induction

Quiz
•
University
20 questions
UAV Drones

Quiz
•
University
20 questions
Administrasi Infrastruktur Jaringan XI (VLAN)

Quiz
•
University
19 questions
Quiz sobre Estructuras Selectivas en Java

Quiz
•
12th Grade - University
15 questions
INFORMATIKA X-5

Quiz
•
10th Grade - University
15 questions
Soal Java

Quiz
•
11th Grade - University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Would you rather...

Quiz
•
KG - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
10 questions
The Constitution, the Articles, and Federalism Crash Course US History

Interactive video
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
16 questions
Water Modeling Activity

Lesson
•
11th Grade - University
10 questions
ACT English prep

Quiz
•
9th Grade - University