Question: 20.) int count = 0; for (int i = 0; i < 10; i++) { for (int j = 0; j < 10; j++) {
20.) int count = 0;
for (int i = 0; i < 10; i++) {
for (int j = 0; j < 10; j++) {
count++;
}}
What is the value of count after the code executed?
| a.) 10 |
| b.) | 0 |
| c.) | 100 |
| d.) | 81 |
21.) When solving a complex problem using software, one should start out by implementing a few ideas. The various code snippets will take us to the final solution.
| a.) | True |
| b.) | False |
22.) A linear homogeneous array is one of the most powerful data structures; but requires that each member is of the same data type and the data must reside in consecutive memory.
| a.) True |
| b.) False
|
23.) int x = 10;
if (x < 10)
x = 2;
else if (x < 100)
x = 3
else
x = -9999
| a.) The else if component will never execute because the if statement is true. |
| b.) | The else if component will execute because x is less than 100 but greater than 9 |
| c.) | The if and the else if component will not execute, therefore the else statement executes. |
| d.) | None of the above. |
24.) int x = 0;
for (int i = 10; i > 0; i--) {
x++;
}
What is the value of x after the code executed?
| a.) | -10 |
| b.) | 0 |
| c.) | 10 |
| d.) | None of the above |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
