Exam 6: The Repetition Structure

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

Which of the following statements adds the number stored in the decPrice variable to the number stored in the decSubtotal variable,and then assigns the result to the decSubtotal variable?

(Multiple Choice)
4.9/5
(40)

Write two different Do...Loop clauses that stop the loop when the value in the intAmount is less than or equal to the value in the intLimit variable.Use the Until keyword in the first clause,and use the While keyword in the second clause.

(Short Answer)
4.8/5
(36)

A counter is always incremented by a constant value.

(True/False)
4.7/5
(41)

Explain the difference between a pretest loop and a posttest loop.

(Essay)
4.8/5
(41)

Which of the following statements pauses program execution for 3 seconds?

(Multiple Choice)
4.9/5
(29)

____ means assigning a beginning value to a counter or an accumulator.

(Multiple Choice)
4.7/5
(45)

The following sample of code contains errors. Rewrite the incorrect statements to correct all errors. -An application allows the user to enter a salary amount.The application should then calculate and display the possible bonuses based on that salary,using bonus rates of 3-6% in increments of .5%. ' displays bonus amounts using rates ' of 3% - 6% in increments of .5% Dim dblSalary As Decimal Dim decBonus As Decimal TryParse(txtSalary.Text,decSalary) lblBonus.Text = String.Empty For decRate As Decimal = 0.03 To 0.06 Step 0.5 decBonus = decSalary + decRate lblBonus.Text = lblBonus.Text & decRate.ToString("P1")& " " & decBonus.ToString("C2")& ControlChars.NewLine Next decRate

(Essay)
4.7/5
(35)

If the stepValue is omitted when coding a For...Next statement,the stepValue is ____ at execution time.

(Multiple Choice)
4.7/5
(42)

A(n)____ read is used to prepare or set up a loop.

(Multiple Choice)
4.9/5
(33)

A(n)____ is a numeric variable used for adding together something.

(Multiple Choice)
4.8/5
(33)

The assignment statement that updates a counter or an accumulator is placed within the loop in a procedure.

(True/False)
4.9/5
(32)

You can use a ____ to display a list of choices from which the user can select zero choices,one choice,or more than one choice.

(Multiple Choice)
4.9/5
(35)

The number of choices the user can select from a list box is controlled by the list box's ____ property.

(Multiple Choice)
4.8/5
(26)

Write a counter-controlled loop that adds 5,10,15,20,25,and 30 to the lstMinutes control.

(Essay)
4.7/5
(34)

You can make a list box any size you want.

(True/False)
4.9/5
(35)

Programmers use a(n)____ when they need the computer to repeatedly process one or more program instructions until some condition is met,at which time the ____ ends.

(Multiple Choice)
4.9/5
(35)

In a Do...Loop statement,a condition can be phrased as either a looping condition or a loop enter condition.

(True/False)
4.8/5
(35)

Each time either the user or a statement selects an item in a list box,the list box's SelectedValueChanged and ____ events occur.

(Multiple Choice)
4.9/5
(41)

You use the ____ tool in the toolbox to add a list box to an interface.

(Multiple Choice)
4.9/5
(33)

What is the Refresh method? Write the syntax for this method.

(Essay)
4.8/5
(36)
Showing 21 - 40 of 60
close modal

Filters

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