Exam 6: The Repetition Structure

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

What is an accumulator? What does it mean to initialize and update an accumulator in a program?

(Essay)
4.9/5
(33)

Case 1 - XYZ Solutions You have just started working for XYZ Solutions as a programmer. Your first assignment is to review and correct various code so that you can become familiar with the company’s programs. -The following code in a different program is not working properly.The message should display the value of the intCounter variable if the intCounter variable contains a balance that is less than or equal to 15.The message does not display.What mistake did the previous programmer make? intCounter = 1 Do Until intCounter <= 15 MessageBox.Show(intCounter) IntCounter += 1 Loop

(Multiple Choice)
4.9/5
(36)

What is a list box? Provide two of the Windows standards for its use on a form.

(Essay)
4.9/5
(33)

In a nested repetition structure,one loop,referred to as the ____ loop,is placed entirely within another loop,called the ____ loop.

(Multiple Choice)
4.9/5
(37)

Case 1 - XYZ Solutions You have just started working for XYZ Solutions as a programmer. Your first assignment is to review and correct various code so that you can become familiar with the company’s programs. -The following code is not working properly.The message should display four times.What needs to be changed for the code to work properly? Do While intCounter < 5 MessageBox.Show("OK") IntCounter = intCounter + 1 Loop

(Multiple Choice)
4.9/5
(28)

Explain the difference between a looping condition and a loop exit condition.

(Essay)
4.9/5
(34)

Write the assignment statements needed to increment the intCount counter by 1 and update the decBalance variable by the value stored in the decOrderAmount variable.

(Essay)
4.8/5
(36)

Case 1 - XYZ Solutions You have just started working for XYZ Solutions as a programmer. Your first assignment is to review and correct various code so that you can become familiar with the company’s programs. -Your supervisor wants you to change the Do...Loop in the previous problem to a For...Next loop.He also wants the message to display only three times.Which of the following For clauses should you use?

(Multiple Choice)
4.9/5
(34)

Case 1 - XYZ Solutions You have just started working for XYZ Solutions as a programmer. Your first assignment is to review and correct various code so that you can become familiar with the company’s programs. -How many times will the message display based on the counter being initialized to 0? intCounter = 0 Do While intCounter < 5 MessageBox.Show("OK") IntCounter = intCounter + 1 Loop

(Multiple Choice)
4.7/5
(32)

Like the condition in a selection structure,the condition in a loop must evaluate to either True or False.

(True/False)
4.8/5
(38)

You can stop an endless loop by clicking Debug on the menu bar,and then clicking ____.

(Multiple Choice)
4.9/5
(28)

Case 1 - XYZ Solutions You have just started working for XYZ Solutions as a programmer. Your first assignment is to review and correct various code so that you can become familiar with the company’s programs. -You changed the Do clause to the correct For clause in the previous problem.You also changed the Loop keyword to the Next keyword for the For...Next loop.What else needs to be changed about the Do loop?

(Multiple Choice)
4.9/5
(46)

In a For...Next statement,if stepValue is positive,then startValue must be ____ endValue for the loop instructions to be processed.

(Multiple Choice)
4.8/5
(26)

To leave a Do...Loop structure earlier than its full completion,you must execute a(n)____ statement.

(Multiple Choice)
4.9/5
(32)

Explain the purpose of priming and update reads in a program.

(Essay)
4.8/5
(33)

The startValue in a For...Next loop structure may be omitted.

(True/False)
4.9/5
(33)

A ____ structure is also referred to as a loop.

(Multiple Choice)
4.8/5
(24)

The ____ method ensures that any code appearing before it that affects the interface's appearance is processed.

(Multiple Choice)
4.8/5
(37)

In a Do...Loop statement,the keyword While indicates that the loop instructions should be processed while the condition is false.

(True/False)
4.9/5
(41)

Which of the following loop structures always executes at least once?

(Multiple Choice)
4.8/5
(44)
Showing 41 - 60 of 60
close modal

Filters

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