Search Header Logo
Java Loop Structure (ITCC105-103I)

Java Loop Structure (ITCC105-103I)

Assessment

Presentation

Computers

University

Medium

Created by

Don Bonus

Used 31+ times

FREE Resource

29 Slides • 10 Questions

1

media

2

media

3

media

4

Multiple Choice

It allows executing specific sections of a code repeatedly.

1

Decision control structure

2

Repetition control structure

3

Sequential control structure

4

All of the mentioned

5

media

6

media

7

media

8

media

9

media

10

Multiple Choice

The statements inside this loop are executed at least once.

1

for loop

2

while loop

3

do-while loop

4

All of the mentioned

11

media

12

media

13

media

14

media

15

Multiple Choice

Question image

The program segment in the image is valid.

1

TRUE

2

FALSE

16

media

17

media

18

media

19

media

20

media

21

media

22

media

23

media

24

media

25

media

26

media

27

media

28

media

29

media

30

media

31

media

32

Multiple Choice

The keyword allows us to preemptively end the current iteration of a loop.

1

break

2

continue

3

both break and continue

4

None of the mentioned

33

Multiple Choice

How many times does the code snippet given below display "Loop Execution"?

int i = 1; while (i != 10) { System.out.println ("Loop Execution"); i++; }

1

8

2

9

3

10

4

None of the mentioned

34

media

35

Multiple Choice

Allow us to redirect the flow of program execution.

1

Decision statement

2

Loop statement

3

Branching statement

4

Sequential statement

36

Multiple Choice

The keyword allows us to preemptively exit a loop.

1

break

2

both break and continue

3

continue

4

return

37

Multiple Choice

Question image

What is the output of the program segment in the image?

1

3

4

5

6

7

8

9

2

345678

3

3456789

4

345678910

38

Multiple Choice

Question image

What is the output of the program segment in the image?

1

4

8

12

16

20

2

1

5

9

13

17

3

1

4

8

12

16

4

None of the mentioned

39

Multiple Choice

Question image

What is the output of the program segment in the image?

1

It will not execute.

2

It is an infinite loop.

3

20

4

2

media

Show answer

Auto Play

Slide 1 / 39

SLIDE