Search Header Logo

C loops

Authored by Ansgar Meroth

Computers

University

Used 9+ times

C loops
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

FILL IN THE BLANK QUESTION

1 min • 1 pt

int sum=10;

for (int i=0;i<=10;i++) {

sum+=i;}

How often does the loop run?

2.

FILL IN THE BLANK QUESTION

1 min • 1 pt

int sum=10;

for (int i=0;i<10;i++) {

sum+=i;}

What is the result of sum after the loop?

3.

FILL IN THE BLANK QUESTION

1 min • 1 pt

int sum=10;

for (int i=0;i<10;i++) {

sum+=i;}

How often does the loop run?

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which type of loop is a for loop?

Pretest

Nontest

Midtest

Posttest

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the correct format of a "for" loop?

for(int i = 0; i < 10; i++);

for[int i = 0; i < 10; i++];

for(int i = 0; i < 10; i++)

for[int i = 0; i < 10; i++]

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What are the three parts of a for loop?

initialize; test; increment

test; initialize; increment

increment; test; initialize

Larry; Mo; Curly

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

int i=0;

while (i>0){

cout << "hello";

i++;}

How often does this run?

0

1

infinite

not sure

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?