C ++ For Loop

C ++ For Loop

9th - 12th Grade

14 Qs

quiz-placeholder

Similar activities

C++ References

C++ References

6th - 12th Grade

12 Qs

C++ Unit 1 Review

C++ Unit 1 Review

9th - 12th Grade

15 Qs

Programming with C++

Programming with C++

9th - 12th Grade

10 Qs

Сpp 1_3

Сpp 1_3

9th - 12th Grade

10 Qs

Elementele de bază ale limbajului C++

Elementele de bază ale limbajului C++

10th Grade

17 Qs

C++ Arrays

C++ Arrays

8th - 12th Grade

12 Qs

Mengenal Algoritma dan Pemrograman C++

Mengenal Algoritma dan Pemrograman C++

10th Grade - University

15 Qs

C++ Coding Problems

C++ Coding Problems

4th Grade - Professional Development

10 Qs

C ++ For Loop

C ++ For Loop

Assessment

Quiz

Computers

9th - 12th Grade

Hard

Created by

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

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?