Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1 (1 point) int x; for (x = 0; x x++; cout } What is the first thing printed by the above code? Question

Question 1 (1 point)

image text in transcribed

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

Question 1 options:

-1

0

1

2

Nothing is printed

Save

Question 2 (1 point)

image text in transcribed

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

Question 2 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 3 (1 point)

image text in transcribed

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

Question 3 options:

8

9

10

11

Nothing is printed

The code never ends

Save

Question 4 (1 point)

image text in transcribed

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

Question 4 options:

0

1

2

8

9

10

11

Nothing is printed

The code never ends

Save

Question 5 (1 point)

image text in transcribed

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)

image text in transcribed

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)

image text in transcribed

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)

image text in transcribed

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)

image text in transcribed

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)

image text in transcribed

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)

image text in transcribed

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)

image text in transcribed

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)

image text in transcribed

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)

image text in transcribed

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)

image text in transcribed

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)

image text in transcribed

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)

image text in transcribed

Question 17 options:

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

Save

Question 18 (1 point)

image text in transcribed

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)

image text in transcribed

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)

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

New Trends In Databases And Information Systems Adbis 2019 Short Papers Workshops Bbigap Qauca Sembdm Simpda M2p Madeisd And Doctoral Consortium Bled Slovenia September 8 11 2019 Proceedings

Authors: Tatjana Welzer ,Johann Eder ,Vili Podgorelec ,Robert Wrembel ,Mirjana Ivanovic ,Johann Gamper ,Mikolaj Morzy ,Theodoros Tzouramanis ,Jerome Darmont

1st Edition

3030302776, 978-3030302771

More Books

Students also viewed these Databases questions