Which of the following statements is true?

```
Segment 1 Segment 2
int i = 0;

for (int i=0; i <= 20; ++i)

while (i < 20) {
{ Console.WriteLine (i);
++i; }
Console.WriteLine (i);
}
```

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.

c) Both (a) and (b) are true.

Computer Science & Information Technology

You might also like to view...

Use of the ________ comparison operator results in true when the field's value is less than or equal to the specified value

A) = B) >= C) <= D) <

Computer Science & Information Technology

_____________ is a network diagnostic tool that shows you each router and server that your data encounters as it travels over the Internet.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology