Exam 5: Control Structures II: Repetition

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

Which of the following loops is guaranteed to execute at least once?

(Multiple Choice)
4.7/5
(37)

The do...while loop has an exit condition but no entry condition.

(True/False)
4.7/5
(40)

If a continue statement is placed in a do...while structure, the loop-continue test is evaluated immediately after the continue statement.

(True/False)
4.8/5
(37)

What is the output of the following code?int count; Int num = 2;for (count = 1; count " "); } System.out.println();

(Multiple Choice)
4.9/5
(35)

Which of the following is NOT a reserved word in Java?

(Multiple Choice)
4.8/5
(38)

A syntax error will result if the control statements of a for loop are omitted.

(True/False)
4.8/5
(34)

static final int EndVal = -1; Int double; Int num = console.nextInt();while (num != EndVal) { Double = num * 2; System.out.println(double); Num = console.nextInt(); }The above code is an example of a(n) ____ while loop.

(Multiple Choice)
4.8/5
(35)

Which of the following is not a function of the break statement?

(Multiple Choice)
4.7/5
(33)

1, 1, 2, 3, 5, 8, 13, 21, ...What is the tenth Fibonacci number in the sequence above?

(Multiple Choice)
4.7/5
(36)

Which of the following is true about a do...while loop?

(Multiple Choice)
4.7/5
(47)
Showing 41 - 50 of 50
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)