Which variable is the loop control variable?

Assume that all variables are of type int and that y and z
are initialized to 0.
```
for (int i = 0; i < 100; ++i) {
cin >> x;
y += x;
if ( x % 2 == 0 )
++z;
}
```
a. i
b. x
c. y
c. z

a. i

Computer Science & Information Technology

You might also like to view...

Case-Based Critical Thinking QuestionsCase 14-1Thelma is researching her computer's audio capabilities. She likes to use her computer to listen to music and is now thinking about trying to import music from her CD collection onto her computer. Thelma's neighbor asked for help reading her e-mails. Thelma knows she is beginning to lose her sight. What system should Thelma suggest to her neighbor that reads the computer screen aloud?

A. graphics software B. word processing software C. text-to-speech software D. sequencer software

Computer Science & Information Technology

The command to kill (delete) all characters from the cursor position to the end of the line is:

a: [Ctrl-k] b: [Ctrl-d] c: [Ctrl-x] [Ctrl-k] d: [Ctrl-k] [Ctrl-d] e: [Ctrl-x] Del

Computer Science & Information Technology