
C++ Conditional and Loop Statements - RECITATION

Quiz
•
Mathematics
•
University
•
Medium
Wendy Ollero
Used 2+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the syntax for the if statement in C++?
if {condition} then {code block}
if (condition) { code block to be executed if the condition is true }
if (condition) { // code block to be executed if the condition is true }
if (condition) then {code block}
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you declare a decinal variable in C++?
float value;
int num;
string name;
bool flag;
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the '&&' operator in C++?
Logical AND operation
Bitwise OR operation
Addition operation
Assignment operation
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Explain the difference between '==' and '=' in C++.
'==' is used for logical operations, and '=' is used for arithmetic operations.
'==' and '=' are interchangeable in C++.
'==' is the assignment operator, and '=' is the equality operator.
'==' is the equality operator, and '=' is the assignment operator.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
When would you use the 'switch' statement in C++?
When you want to define a function with multiple return statements.
When you have multiple conditions to check against a single variable.
When you want to execute a block of code only if a condition is true.
When you need to loop through a block of code multiple times.
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is the syntax for the 'for' loop in C++?
for(initialization; condition; increment) [ // code to be executed ]
for(initialization; condition; update) { // code to be executed }
for(initialization; condition; increment) // code to be executed
for(initialization; condition; increment) { // code to be executed }
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the '++' operator do in C++?
It increments the value of the variable by 1.
It assigns the value of the variable to 0.
It decrements the value of the variable by 1.
It multiplies the value of the variable by 2.
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Model Inequalities

Quiz
•
7th Grade - University
20 questions
Operation on Rational Expression

Quiz
•
8th Grade - University
10 questions
Simplifying, Multiplying, Dividing, Adding, and Subtracting Rational Expressions

Quiz
•
11th Grade - University
15 questions
Conditions

Quiz
•
University
14 questions
Multiplying Dividing Adding Subtracting Rational Expressions

Quiz
•
11th Grade - University
15 questions
Illustrative Mathematics Algebra

Quiz
•
7th Grade - University
10 questions
Intro to Inequalities

Quiz
•
6th Grade - University
20 questions
Identify Equation of Graph

Quiz
•
9th Grade - University
Popular Resources on Wayground
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World

Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
20 questions
ELA Advisory Review

Quiz
•
7th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns

Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Mathematics
20 questions
Place Value

Quiz
•
KG - 3rd Grade
20 questions
1st Grade Module 1-3 CBA Review

Quiz
•
KG
14 questions
Scientific Notation with Positive and Negative Powers

Quiz
•
KG - University
16 questions
Subitizing C

Quiz
•
KG
17 questions
Multiplication/division

Quiz
•
KG - 3rd Grade
12 questions
2D Shapes

Quiz
•
KG - 1st Grade
20 questions
Subtraction within 20

Quiz
•
KG - 2nd Grade
10 questions
Counting Nickels

Quiz
•
KG - 2nd Grade