Answer the following statements true (T) or false (F)

1. Counter-controlled repetition requires only a control variable, an initial value for the control variable and an increment or decrement.
2. Counting loops should be controlled with whatever data type most closely reflects the operations taking place, whether that is an Integer, Single or Double.
3. A control variable that is declared in a For…Next statement header may not be used outside of the body of the For…Next statement.
4. The control variable of the For…Next statement must have its type declared before or at the beginning of the loop.
5. The Visual Basic operator ^ can be used for exponentiation.


1. False. Counter-controlled repetition also requires a loop-continuation condition to determine whether the loop should continue executing the statements in its body.
2. False. Integers should be used to control counting loops, because the approximate nature of floating-point values may prevent loop-continuation conditions from evaluating correctly.
3. True.
4. False. The control variable can be used without its type being declared through local type inference (the initialization statement implies the variable’s type).
5. True.

Computer Science & Information Technology

You might also like to view...

Which of the following is not a good reason for choosing a certain loop control?

a. What the loop does b. The minimum number of iterations of the loop c. The condition for ending the loop d. If the loop is in a function

Computer Science & Information Technology

Write an algorithm for the add method that will add at the end of the list instead of the beginning. What is the time complexity of this algorithm?

What will be an ideal response?

Computer Science & Information Technology

The field size indicates the maximum length of a data field

Indicate whether the statement is true or false

Computer Science & Information Technology

Bold, italic, and underline are examples of font ________

Fill in the blank(s) with correct word

Computer Science & Information Technology