Multiple Choice
for (int i = 0; i < 10; i++) {
Console.WriteLine("counter " + i) ;
}
The variable i defined in the program segment above ____.
A) is out of scope when the loop terminates
B) creates an error because it is changed in the update portion
C) would have a value of 10 if it were printed on the outside of the loop
D) can be displayed prior to the loop program statements
Correct Answer:

Verified
Correct Answer:
Verified
Q54: int sum = 0;<br>int number = 1;<br>while
Q55: Scope refers to the region in the
Q56: Class diagrams show the data, method, and
Q57: In order to use the MessageBox.Show( )
Q58: A state-controlled loop should be designed when
Q60: You often need to do a "prime
Q61: The only posttest loop structure available in
Q62: With the while loop, the body of
Q63: int loopVariable = 0; do<br>{<br>Console.WriteLine("Count = {0:}",
Q64: The _ statement is a pretest form