What does the following C program segment display on the sc
What does the following C+ + program segment display on the screen #include main() {int i, j = 2 for(i = 3; i
Solution
Solution:
4. B. Initially i=3
Iterations of for loop
i j i+j
Ist iteration 3 2 5
IInd iteration 4 2 6
IIIrd iteration 5 2 7
IVth iteration 6 for loop ends as i>5
5. A. Initially i=3
Iterations of for loop
i j i+j
Ist iteration 3 9 12
IInd iteration 4 9 13
IIIrd iteration 5 9 14
IVth iteration 6 for loop ends as i>5
