Important MCQ

Output? for (int i = 1; i <= 2; i++) { for (int j = 1; j <= 2; j++) { for (int k = 1; k <= 2; k++) cout << "#"; } } How many # are printed?

Q.Output? for (int i = 1; i <= 2; i++) { for (int j = 1; j <= 2; j++) { for (int k = 1; k <= 2; k++) cout << "#"; } } How many # are printed?

A) 4
B) 6
C) 8
D) 2
Correct Answer:
Option C
Detailed Explanation:
2 x 2 x 2.