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

This set of Visual Basic Multiple Choice Questions & Answers (MCQs) focuses on “Repetition Structure – Counters and Accumulators”.

1. ______________ is a numeric variable used for counting something.
a) Accumulator
b) Counter
c) Positive
d) Negative

Explanation: 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) Positive
d) Negative

Explanation: 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

Explanation: 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) Updating
c) Backtracking
d) Checking

Explanation: 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

Explanation: 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.
Note: Join free Sanfoundry classes at Telegram or Youtube

6. Text box’s ReadOnly Property is set to ______________ by default.
a) True
b) False

Explanation: Text box’s ReadOnly property is set to false by default. Changing a text box’s ReadOnly property from its default value (False) to True prevents the user from changing the contents of the text box during run time.

7. A text box’s _____________ property specifies whether the text box has scroll bar.
a) Multiline Property
d) ScrollBars Property

Explanation: 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.

8. The instruction above the loop is known as the ______________

Explanation: 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.

9. The instruction in the loop body is referred to as ______________

Explanation: 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.

10. The _______________ allows you to abbreviate an assignment statement.
a) Arithmetic assignment operator
b) Shorthand operator
c) Long operator
d) Predefined operator

Explanation: The arithmetic assignment operators allow you to abbreviate an assignment statement that contains an arithmetic operator, as long as the assignment statement has the following format, in which variableName is the name of the same variable: variableName = variableName arithmeticOperator value. For example, you can use the addition assignment operator (+=) to abbreviate the statement intAge = intAge + 1 as follows: intAge += 1. Both statements tell the computer to add the number 1 to the contents of the intAge variable and then store the result in the intAge variable.

Sanfoundry Global Education & Learning Series – Visual Basic.

To practice all areas of Visual Basic, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]