C ++ For Loop

Quiz
•
Computers
•
9th - 12th Grade
•
Hard
Charles Martinez
Used 1+ times
FREE Resource
14 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What output is produced by the following segment of code:
for(int i = 0; i < 10; i++)
cout << i << " ";
0 1 2 3 4 5 6 7 8 9 10
0 1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6 7 8 9
Infinite Loop
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What output is produced by the following segment of code:
for(int i = 0; i <= 10; i++)
cout << i << " ";
0 1 2 3 4 5 6 7 8 9 10
0 1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6 7 8 9
Infinite Loop
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What output is produced by the following segment of code:
for(int i = 1; i <= 10; i++)
cout << i << " ";
0 1 2 3 4 5 6 7 8 9 10
0 1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6 7 8 9
Infinite Loop
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What output is produced by the following segment of code:
for(int fun = 20; fun > 1; fun -=3)
cout << fun << " ";
20 17 14 11 8 5 2 -1
20 17 14 11 8 5 2
17 14 11 8 5 2 -1
20 17 14 11 8 5
Infinite Loop
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What output is produced by the following segment of code:
int start = 5;
int end = 20;
for(; start <= end; start +=2)
cout << start << " ";
5 7 9 11 13 15 17 19 21
7 9 11 13 15 17 19 20
7 9 11 13 15 17 19 21
5 7 9 11 13 15 17 19
Infinite Loop
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What output is produced by the following segment of code:
for (int dmc = 8; dmc >= 0; dmc-=4)
cout << dmc << " ";
8 4 0
8 4
8
No Output
Infinite Loop
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What output is produced by the following segment of code:
for (int dmc = 8; dmc >= 8; dmc-=4)
cout << dmc << " ";
8 4 0
8 4
8
No Output
Infinite Loop
Create a free account and access millions of resources
Similar Resources on Wayground
12 questions
Divide et Impera

Quiz
•
11th Grade - University
10 questions
Matematinės funkcijos

Quiz
•
10th Grade
10 questions
Вспоминаем условный оператор

Quiz
•
8th - 10th Grade
12 questions
Praca klasowa C++

Quiz
•
12th Grade
10 questions
Le basi C++

Quiz
•
11th Grade
19 questions
Midterm 12C SU

Quiz
•
12th Grade
16 questions
Python массив

Quiz
•
9th Grade
15 questions
Latihan Soal

Quiz
•
11th Grade
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
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
10 questions
1.2 OSI & TCP IP Models Quiz

Quiz
•
10th Grade
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
30 questions
Introduction to Computers

Quiz
•
8th - 9th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
20 questions
Hardware vs. Software Quiz

Quiz
•
7th - 10th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade