Nested For Loop Iterations
In the code segment below, what is the total number of times the body of the inner for loop is executed?
for (int i = 0; i < 4; i++){
for (int j = i; j < 4; j++){
// Loop Body
}
}
A
10
B
9
C
7
D
8
Question Leaderboard
| Rank | |||||
|---|---|---|---|---|---|
| #1 | michael.2103ll | 2 | 2 | 0m 00s | 200 |
| #2 | varunrajaram1 | 1 | 1 | 0m 00s | 100 |
| #3 | alchemax043 | 1 | 1 | 0m 38s | 62 |
| #4 | kazvin.tjakradinata | 1 | 1 | 0m 47s | 53 |
| #5 | leftoverjluck | 1 | 1 | 0m 50s | 50 |
| #6 | lsj08030922 | 1 | 1 | 1m 00s | 40 |
| #7 | bommasam000 | 1 | 4 | 0m 54s | 16 |
| #8 | parth.taur227 | 1 | 1 | 1m 44s | -4 |
| #9 | songqiuhui2012 | 0 | 1 | 0m 06s | -16 |
| #10 | 7017046 | 1 | 2 | 1m 59s | -29 |
Items per page:
10
1 – 10 of 16
APFIVE