Which of the following statements are true?
Consider the following two Java code segments:
Segment 1 Segment 2
```
int i = 0;
for (int i = 0; i <= 20; i++) {
while (i < 20) { System.out.println(i);
i++; }
System.out.println(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...
Which Cisco IOS command is used to manually configure the EIGRP router ID (RID)?
A) router-id rid B) eigrp id rid C) eigrp router-id rid D) id rid
Computer Science & Information Technology
Key loggers can be only software-based
Indicate whether the statement is true or false.
Computer Science & Information Technology