
C++ Conditional and Loop Statements - RECITATION
Authored by Wendy Ollero
Mathematics
University
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
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.
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
15 questions
Monday NJSLA Review
Quiz
•
4th Grade - University
11 questions
Moments and Moment Generating Function
Quiz
•
University
10 questions
Sử dụng biến trong chương trình
Quiz
•
7th Grade - University
11 questions
Algebra: Solving Linear Equations
Quiz
•
University
10 questions
Fractions Number Line
Quiz
•
KG - University
10 questions
Differentiation of Trigonometric Functions
Quiz
•
12th Grade - University
20 questions
2. Ayo Main Quiz Lagi
Quiz
•
University - Professi...
15 questions
Math 1110 -- College Algebra Midterm Review
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
10 questions
Probability Practice
Quiz
•
4th Grade
15 questions
Probability on Number LIne
Quiz
•
4th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
6 questions
Appropriate Chromebook Usage
Lesson
•
7th Grade
10 questions
Greek Bases tele and phon
Quiz
•
6th - 8th Grade
Discover more resources for Mathematics
20 questions
Place Value
Quiz
•
KG - 3rd Grade
10 questions
Add & Subtract Mixed Numbers with Like Denominators
Quiz
•
KG - University
10 questions
2D & 3D Shapes
Quiz
•
KG
6 questions
2D Shapes
Lesson
•
KG - 3rd Grade
15 questions
Simple Patterns AB, ABB, ABC
Quiz
•
KG - 1st Grade
16 questions
3D Shapes
Quiz
•
KG - 1st Grade
15 questions
2D and 3D shapes
Quiz
•
KG
12 questions
tens and ones
Quiz
•
KG - 1st Grade