Question: Question 5 (1 point) Given the following code, what is the final value of i? int i,j; for(i=0;i for(j=0;j if(i==2) break; } } Question 5

Question 5 (1 point)

Question 5 (1 point) Given the following code, what is the final

Given the following code, what is the final value of i? int i,j; for(i=0;i for(j=0;j if(i==2) break; } }

Question 5 options:

3

4

5

0

Save

Question 6 (1 point)

value of i? int i,j; for(i=0;i for(j=0;j if(i==2) break; } } Question

int x; for (x = 0;x > 10;x++) { cout } What is the last thing printed by the above code?

Question 6 options:

8

9

10

11

Nothing is printed

The code never ends

Save

Question 7 (1 point)

5 options: 3 4 5 0 Save Question 6 (1 point) int

Which of the following code segments will count from 1 to 99 (including 1 and 99)?

Question 7 options:

for (int i=1; i

for (int i=1; i

for (int i=0; i

for (int i=0; i

for (int i=1; i

Save

Question 8 (1 point)

x; for (x = 0;x > 10;x++) { cout } What is

int x = 0; while (x x+=2; cout } What is the output of the above code?

Question 8 options:

0 1 2 3 4 5 6 7 8 9

0 1 2 3 4 5 6 7 8 9 10

1 2 3 4 5 6 7 8 9

1 2 3 4 5 6 7 8 9 10

0 2 4 6 8

0 2 4 6 8 10

0 2 4 6 8 10 12

2 4 6 8

2 4 6 8 10

2 4 6 8 10 12

1 3 5 7 9

1 3 5 7 9 11

Nothing is printed

The code never ends

Save

Question 9 (1 point)

the last thing printed by the above code? Question 6 options: 8

int x; for (x = 0; x } cout What is the last thing printed by the above code?

Question 9 options:

0

1

2

8

9

10

11

Nothing is printed

The code never ends

Save

Question 10 (1 point)

9 10 11 Nothing is printed The code never ends Save Question

int x; for (x = 0; x cout } What is the last thing printed by the above code?

Question 10 options:

8

9

10

11

Nothing is printed

The code never ends

Save

Question 11 (1 point)

7 (1 point) Which of the following code segments will count from

int x; for(x = 0;x >= 0; x++) { cout } What is the last thing printed by the above code?

Question 11 options:

8

9

10

11

Nothing is printed

The code never ends

Save

Question 12 (1 point)

1 to 99 (including 1 and 99)? Question 7 options: for (int

int x; for (x = 0; x != 10; x+=2) { cout } What is the output of the above code?

Question 12 options:

0 1 2 3 4 5 6 7 8 9

0 1 2 3 4 5 6 7 8 9 10

1 2 3 4 5 6 7 8 9

1 2 3 4 5 6 7 8 9 10

0 2 4 6 8

0 2 4 6 8 10

0 2 4 6 8 10 12

2 4 6 8

2 4 6 8 10

2 4 6 8 10 12

1 3 5 7 9

1 3 5 7 9 11

Nothing is printed

The code never ends

Save

Question 13 (1 point)

i=1; i for (int i=1; i for (int i=0; i for (int

int x; for (x = 0;x cout } What is the first thing printed by the above code?

Question 13 options:

-1

0

1

2

Nothing is printed

Save

Question 14 (1 point)

i=0; i for (int i=1; i Save Question 8 (1 point) int

int x = 0; while (x > 10) { x++; } cout What is the last thing printed by the above code?

Question 14 options:

0

1

2

8

9

10

11

Nothing is printed

The code never ends

Save

Question 15 (1 point)

x = 0; while (x x+=2; cout } What is the output

int x; for(x = 0;x > 10;x++) { x++; cout } What is the last thing printed by the above code?

Question 15 options:

8

9

10

11

Nothing is printed

The code never ends

Save

Question 16 (1 point)

of the above code? Question 8 options: 0 1 2 3 4

int x = 0; while (x cout ++x; } What is the last thing printed by the above code?

Question 16 options:

8

9

10

11

Nothing is printed

The code never ends

Save

Question 17 (1 point)

5 6 7 8 9 0 1 2 3 4 5 6

Question 17 options:

A compound statement that contains variable declarations is called a __________.

Save

Question 18 (1 point)

7 8 9 10 1 2 3 4 5 6 7 8

int x; for (x = 0;x > 10; x++) { cout } What is the first thing printed by the above code?

Question 18 options:

-1

0

1

2

Nothing is printed

Save

Question 19 (1 point)

9 1 2 3 4 5 6 7 8 9 10 0

int x = 0; while (x x+=2; cout } What is the output of the above code?

Question 19 options:

0 1 2 3 4 5 6 7 8 9

0 1 2 3 4 5 6 7 8 9 10

1 2 3 4 5 6 7 8 9

1 2 3 4 5 6 7 8 9 10

0 2 4 6 8

0 2 4 6 8 10

0 2 4 6 8 10 12

2 4 6 8

2 4 6 8 10

2 4 6 8 10 12

1 3 5 7 9

1 3 5 7 9 11

Nothing is printed

The code never ends

Save

Question 20 (1 point)

2 4 6 8 0 2 4 6 8 10 0 2

Question 20 options:

Complete the following code segment// count from 1 to 99// 1 is the first number printed// 99 is the last number printedint i=1;while (i cout }

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!