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...

Which type of permissions are considered the most basic level of data security in Windows 10?

A. EFS B. NTFS C. FAT D. NAP

Computer Science & Information Technology

To unlock all of the controls, ____-click the form, and then click Lock Controls on the context menu.

A. double B. triple C. left D. right

Computer Science & Information Technology

Use C++11 list initializers to initialize the vector names with the strings "Suzanne", "James", "Maria" and "Juan". Show both common syntaxes.

What will be an ideal response?

Computer Science & Information Technology

Which of the following will cause a syntax error, if you are trying to compare x to 5?

A. if (x == 5) B. if (x = 5) C. if (x <= 5) D. if (x >= 5)

Computer Science & Information Technology