Which of the following C++ loop structures always runs at least once? while, do-while, for, none of the loop types is guaranteed to run once
CS172 Final Exam York College

Flashcard
•
Computers
•
•
Hard
Quizizz Content
FREE Resource
Student preview

49 questions
Show all answers
1.
FLASHCARD QUESTION
Front
Back
do-while
2.
FLASHCARD QUESTION
Front
How many iterations does a loop with the following header make (assume the loop body makes no changes to i)?
for (int i = 1; i < 5; i++)
Back
4
3.
FLASHCARD QUESTION
Front
What is the output of the following code?
int count = 0;
do {
cout << count << " ";
count++;
} while (count < 5);
Back
0 1 2 3 4
4.
FLASHCARD QUESTION
Front
What output is produced by the following segment of code:
for (int x = 10; x > 0; x++)
cout << x << " ";
Back
Infinite Loop
5.
FLASHCARD QUESTION
Front
How many loop types are there in C++?
Back
3
6.
FLASHCARD QUESTION
Front
Fill in the blank to make this code print Go Heat! 3 times
int loop = 0;
while(__________) {
cout<<“Go Heat”<
}
Back
loop < 3
7.
FLASHCARD QUESTION
Front
What is the purpose of loops in programming?
Back
To execute a block of code multiple times
Create a free account and access millions of resources
Similar Resources on Quizizz
46 questions
FALL MP2 Exam Intro to CS (Coding in Python)

Flashcard
•
7th - 9th Grade
42 questions
coding advanced

Flashcard
•
9th - 12th Grade
50 questions
EDEXCEL GCSE CS Summary

Flashcard
•
10th Grade
45 questions
APCSP Semester Review

Flashcard
•
8th - 9th Grade
41 questions
Int Prog Semester 1 Final

Flashcard
•
8th Grade
42 questions
AP CSP Unit 4 Review

Flashcard
•
9th - 12th Grade
45 questions
Python Unit 1-2 Review

Flashcard
•
9th - 12th Grade
41 questions
CS1 Python Midterm

Flashcard
•
KG - 8th Grade
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
25 questions
SS Combined Advisory Quiz

Quiz
•
6th - 8th Grade
40 questions
Week 4 Student In Class Practice Set

Quiz
•
9th - 12th Grade
40 questions
SOL: ILE DNA Tech, Gen, Evol 2025

Quiz
•
9th - 12th Grade
20 questions
NC Universities (R2H)

Quiz
•
9th - 12th Grade
15 questions
June Review Quiz

Quiz
•
Professional Development
20 questions
Congruent and Similar Triangles

Quiz
•
8th Grade
25 questions
Triangle Inequalities

Quiz
•
10th - 12th Grade
Discover more resources for Computers
15 questions
Multiplication Facts

Quiz
•
4th Grade
25 questions
SS Combined Advisory Quiz

Quiz
•
6th - 8th Grade
40 questions
Week 4 Student In Class Practice Set

Quiz
•
9th - 12th Grade
40 questions
SOL: ILE DNA Tech, Gen, Evol 2025

Quiz
•
9th - 12th Grade
20 questions
NC Universities (R2H)

Quiz
•
9th - 12th Grade
15 questions
June Review Quiz

Quiz
•
Professional Development
20 questions
Congruent and Similar Triangles

Quiz
•
8th Grade
25 questions
Triangle Inequalities

Quiz
•
10th - 12th Grade