Looping & Functions C++

Quiz
•
Computers
•
University
•
Easy
Long Trần
Used 6+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of loops in C++?
To execute code only once
To repeat a set of statements multiple times
To store values in memory
To declare variables
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a pre-test loop in C++?
while
do-while
switch
for
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the difference between a while loop and a do-while loop?
while is post-test, do-while is pre-test
while loop checks the condition before executing, do-while checks after execution
do-while loop never executes
They behave the same way
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following loops guarantees at least one execution of the loop body?
for
while
do-while
if
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is an event-controlled loop?
A loop that runs for a specific number of iterations
A loop that continues until a certain event or condition occurs
A loop that runs based on user input
A loop that runs indefinitely
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which loop structure is most suitable for iterating a known number of times?
for loop
while loop
do-while loop
switch statement
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the break statement do in a loop?
It skips the current iteration
It stops the loop and exits immediately
It restarts the loop
It increments the loop variable
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
PHP Quiz 1

Quiz
•
University
20 questions
Review JavaScript

Quiz
•
11th Grade - University
20 questions
Week 6 Quiz

Quiz
•
University
15 questions
coding

Quiz
•
KG - Professional Dev...
20 questions
EST102 : PROGRAMMING IN C TEST 1

Quiz
•
University
15 questions
Control Statements - Java

Quiz
•
University
25 questions
Understanding Loops in Programming

Quiz
•
University
16 questions
A "C" Event-the backbone of modern coding.

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

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

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University