Exam 6: Loops

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

What will be the final output of the following code snippet when a user enters input values in the order 10, 20, 30, 40, 50, and -1? What will be the final output of the following code snippet when a user enters input values in the order 10, 20, 30, 40, 50, and -1?

(Multiple Choice)
4.8/5
(39)

In the following code snippet, when does the execution of the program switch from the inner loop to the outer loop? In the following code snippet, when does the execution of the program switch from the inner loop to the outer loop?

(Multiple Choice)
4.8/5
(49)

When will the loop in the following code snippet stop? When will the loop in the following code snippet stop?   I.when the user enters an integer II.when the user enters an alphabetic character III.after the user enters 100 numbers I.when the user enters an integer II.when the user enters an alphabetic character III.after the user enters 100 numbers

(Multiple Choice)
4.8/5
(31)

What is the output of the code snippet given below? What is the output of the code snippet given below?

(Multiple Choice)
4.9/5
(31)

When hand-tracing the loop in the code snippet below, which variables are important to evaluate? When hand-tracing the loop in the code snippet below, which variables are important to evaluate?

(Multiple Choice)
4.9/5
(39)

What is the output of the following code snippet? What is the output of the following code snippet?

(Multiple Choice)
4.9/5
(35)

What is the output of the following code snippet? What is the output of the following code snippet?

(Multiple Choice)
4.9/5
(27)

How many times does the following loop execute? How many times does the following loop execute?

(Multiple Choice)
4.8/5
(35)

What is the first and last value of i to be displayed by the following code snippet? What is the first and last value of i to be displayed by the following code snippet?

(Multiple Choice)
4.9/5
(28)

What is the output of the code snippet given below? What is the output of the code snippet given below?

(Multiple Choice)
4.9/5
(32)

Is the code snippet written below legal? (lines are numbered for reference) Is the code snippet written below legal? (lines are numbered for reference)

(Multiple Choice)
5.0/5
(44)

Which of the following for loops is illegal?

(Multiple Choice)
4.9/5
(33)

What is the output of this loop? What is the output of this loop?

(Multiple Choice)
4.8/5
(41)

What is the output of this code snippet? What is the output of this code snippet?

(Multiple Choice)
4.8/5
(29)

What values does counter variable i take on when this loop executes? What values does counter variable i take on when this loop executes?

(Multiple Choice)
4.9/5
(27)

What is the output of the code snippet given below? What is the output of the code snippet given below?

(Multiple Choice)
4.8/5
(36)

What is the output of the following code snippet? What is the output of the following code snippet?

(Multiple Choice)
4.7/5
(37)

Which error type does the "off-by-one" error belong to?

(Multiple Choice)
4.8/5
(37)

What is the output of the following loop? What is the output of the following loop?

(Multiple Choice)
4.9/5
(41)

What is the output of the following code snippet? What is the output of the following code snippet?

(Multiple Choice)
4.9/5
(39)
Showing 61 - 80 of 107
close modal

Filters

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