Multiple Choice
Consider the following two C# code segments:
Segment 1 Segment 2
Int i = 0;
For (int i=0;i < = 20;++i)
While (i < 20) {
{ Console.WriteLine (i) ;
++i; }
Console.WriteLine (i) ;
}
Which of the following statements is true
A) The output from these segments is not the same.
B) The scope of the control variable i is different for the two segments.
C) Both (a) and (b) are true.
D) Neither (a) nor (b) is true.
Correct Answer:

Verified
Correct Answer:
Verified
Q11: Which case of the following would warrant
Q42: If a while condition is never true,the
Q43: What occurs when an empty case matches
Q44: A default case must be provided for
Q45: Which of the following statements is false<br>A)
Q46: The loop body of a do…while statement
Q49: The break statement terminates a program.
Q50: The statement,when executed in a for loop,will
Q51: The while statement is sufficient to perform
Q52: A case can be labeled as to