The output of this program will be:

Consider the program below:

```
public class Test {
public static void main(String[] args) {
int[] a;
a = new int[10];

for (int i = 0; i < a.length; i++) {
a[i] = i + 2;
}

int result = 0;
for (int i = 0; i < a.length; i++) {
result += a[i];
}

System.out.printf("Result is: %d%n", result);
}
}

```

a. Result is: 62.
b. Result is: 64.
c. Result is: 65.
d. Result is: 67.

c. Result is: 65.

Computer Science & Information Technology

You might also like to view...

A secret message has been encrypted with a key that is as long as the message itself. The key will be used for only this message. The type of encryption used here is:

a. Running key cipher b. One-time cipher c. One-time pad d. Diffie-Hellman

Computer Science & Information Technology

Select the false statement.

a. C++ includes object serialization by default. b. After a serialized object has been written to a file, it can be read from the file and deserialized—that is, the type information and bytes that represent the object and its data can be used to recreate the object in memory. c. When an object is output to disk, only the values of its attributes are output. d. None of the above.

Computer Science & Information Technology