How many times is the loop body of the for statement executed?
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. once
b. 99 times
c. 100 times
d. until a number larger than 100 is entered
c. 100 times
Computer Science & Information Technology
You might also like to view...
What is File name extension?
What will be an ideal response?
Computer Science & Information Technology
A document theme is a type of linked style
Indicate whether the statement is true or false
Computer Science & Information Technology
Which of the following is not a data validation technique?
What will be an ideal response?
Computer Science & Information Technology
What is an access key? What are three reasons access keys should be set in a Windows application?
What will be an ideal response?
Computer Science & Information Technology