Question: Question 1 Match the type of loop to its best description. Group of answer choices counted loop [ Choose ] while loop do-while loop for

Question 1

Match the type of loop to its best description.

Group of answer choices

counted loop

[ Choose ] while loop do-while loop for loop

pre-test loop

[ Choose ] while loop do-while loop for loop

post-test loop

[ Choose ] while loop do-while loop for loop

Question 2

A boolean expression is used to determine if a loop will continue or not.

Group of answer choices

True

False

Question 3

How many times will this loop execute?

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

{

...

}

Group of answer choices

0

5

6

7

Question 4

How many times will this loop execute?

for (int i = 5; i > 0; i--)

{

...

}

Question 5

What is the output of this loop?

int i = 3;

while (i > 0)

{

cout << i << " ";

}

cout << endl;

Group of answer choices

3 2 1

3 2 1 0

3 3 3 3 3 3 3 3 3 3 3 3 3 3 ....

Question 6

What is the output of this loop?

int i = 3;

while (i > 0)

{

cout << i-- << " ";

}

cout << endl;

Group of answer choices

3 2 1

3 2 1 0

3 3 3 3 3 3 3 3 3 3 3 3....

Question 7

An infinite loop is one that never stops - it will continue to repeat and execute the loop statements.

Group of answer choices

True

False

Question 8

These loops will produce the same results.

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

{

cout << i;

}

int i = 0;

while (i <= 10)

{

cout << i;

i++;

}

Group of answer choices

True

False

Question 9

What statement most accurately describes the output of this loop?

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

{

if (i % 2 == 1)

cout << i << " ";

}

Group of answer choices

all of the numbers between 0 and 100

all of the even numbers between 0 and 100

all of the odd numbers between 0 and 100

all of the even numbers between 0 and 99

all of the odd numbers between 0 and 99

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!