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
7
B
9
C
10
D
8
Question Leaderboard
| Rank | |||||
|---|---|---|---|---|---|
| #1 | michael.2103ll | 2 | 2 | 0m 00s | 200 |
| #2 | varunrajaram1 | 1 | 1 | 0m 00s | 100 |
| #3 | zhenmunse | 1 | 1 | 0m 02s | 98 |
| #4 | Wilbert.Ankomah27 | 1 | 1 | 0m 22s | 78 |
| #5 | ragulk14122006 | 1 | 1 | 0m 25s | 75 |
| #6 | alchemax043 | 1 | 1 | 0m 38s | 62 |
| #7 | kazvin.tjakradinata | 1 | 1 | 0m 47s | 53 |
| #8 | leftoverjluck | 1 | 1 | 0m 50s | 50 |
| #9 | lsj08030922 | 1 | 1 | 1m 00s | 40 |
| #10 | bommasam000 | 1 | 4 | 0m 54s | 16 |
Items per page:
10
1 – 10 of 24
