What is the primary purpose of selection control structures in C++?

CSC126_Quiz5: Chapter 3

Quiz
•
Computers
•
University
•
Hard
TS ZAKARIA
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
To execute different statements based on conditions
To define data types
To repeat statements based on conditions
To execute statements in a sequence
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is NOT a type of selection control structure in C++?
if
loop
if-else
switch
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does a Boolean expression evaluate to?
A string
True or false
A character
An integer
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which operator is used to combine two Boolean expressions?
Relational operator
Logical operator
Arithmetic operator
Bitwise operator
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In a two-way if-else selection structure, what happens if the condition is false?
The first statement is executed
The condition is re-evaluated
The program terminates
The second statement is executed
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct syntax for a one-way if selection statement?
if expression then statement;
if (expression) { statement; }
if (expression) statement else statement;
if (expression) statement;
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is an example of a compound Boolean expression?
10 > 5
x == y
(10 > 5) && (10 < 6)
a != b
Create a free account and access millions of resources
Similar Resources on Quizizz
19 questions
Get started with python

Quiz
•
University
14 questions
Python L1

Quiz
•
8th Grade - University
10 questions
MIT App Inventor - Chapter 4

Quiz
•
University
20 questions
PF_Q1_IT1104

Quiz
•
University
15 questions
Python

Quiz
•
University
15 questions
Research Unit Quizzizz

Quiz
•
8th Grade - University
20 questions
Recap C++

Quiz
•
University
13 questions
Logical Operators

Quiz
•
9th Grade - University
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade