# Repetition Structure – Counters and Accumulators - Visual Basic Questions and Answers

1.

______________ is a numeric variable used for counting something.

A.) Accumulator
B.) Positive
C.) Negative
D.) Counter

Counter

Counter is a numeric value used for counting something and accumulator is a valued used for accumulating something, such as adding, such as total amount of a month earned by a person etc.

2.

____________ is a numeric variable used for accumulating something.

A.) Accumulator
B.) Counter
C.) Negative
D.) Positive

Counter

Counter is a numeric value used for counting something and accumulator is a valued used for accumulating something, such as adding, such as total amount of a month earned by a person etc.

3.

_____________means to assign a beginning value to the counter or accumulator.

A.) Initializing
B.) Updating
C.) Incrementing
D.) Checking

Initializing
Initializing means to assign a beginning value to the counter or accumulator. Typically, counters and accumulators are initialized to the number 0. However, they can be initialized to any number, depending on the value required by the procedure.

4.

_______________ means adding a number to the value stored in the accumulator or counter.

A.) Initializing
B.) Backtracking
C.) Updating
D.) Checking

Updating

Updating often referred to as incrementing, means adding a number to the value stored in the counter or accumulator. The number can be either positive or negative, integer or non-integer. A counter is always updated by a constant value—typically the number 1—whereas an accumulator is updated by a value that varies.

5.

When a checkbox’s ____________ property is set to true, it can both accept and display multiple lines of text.

A.) Multiline Property
D.) ScrollBars Property

Multiline Property
When a text box’s Multiline property is set to True, the text box can both accept and display multiple lines of text; otherwise, only one line of text can be entered in the text box, that is when the property is set to false, it can only accept and display one line of text.

6.

A text box’s _____________ property specifies whether the text box has scroll bar.

A.) Multiline Property
D.) ScrollBars Property

A text box’s ScrollBars property specifies whether the text box has scroll bar. A text box’s ScrollBars property specifies whether the text box has no scroll bars (the default), a horizontal scroll bar, a vertical scroll bar, or both horizontal and vertical scroll bars.

7.

The instruction above the loop is known as the ______________

The instruction above the loop is referred to as the priming read, because it is used to prime (prepare or set up) the loop. The priming read initializes the loop condition by providing its first value.

8.

The instruction in the loop body is referred to as ______________

The instruction in the loop body is referred to as the update read, because it allows the user to update the value of the input item (in this case, the sales amount) that controls the loop’s condition. The update read is often an exact copy of the priming read. Keep in mind that if you don’t include the update read in the loop body, there will be no way to enter a value that will stop the loop after it has been processed the first time. This is because the priming read is processed only once.

9.

The _______________ allows you to abbreviate an assignment statement.

A.) Arithmetic assignment operator
B.) Shorthand operator
C.) Predefined operator
D.) Long operator