How many times is the println statement executed?

```
for (int i = 0; i < 10; i++)
for (int j = 0; j < 10; j++)
System.out.println(i * j);
```
a. 100
b. 20
c. 10
d. 45

a. 100
The outer loop is executed 10 times for i from 0 to 9 and the inner loop is executed 10 times from j from 0 to 9. So the print statement is executed 100 times. The correct answer is A.

Computer Science & Information Technology

You might also like to view...

In Windows 10, the default browser is Edge

Indicate whether the statement is true or false

Computer Science & Information Technology

What are the three required sets of statements for every function in C++?

What will be an ideal response?

Computer Science & Information Technology