Question: (6) Given the following program segment in Figure 6. 0 JOAN 1 2 3 4 5 int row = 5, col; while (row >= 1)
(6) Given the following program segment in Figure 6. 0 JOAN 1 2 3 4 5 int row = 5, col; while (row >= 1) { col = 4; while (col >= 1) { printf ("@"); col--; 1 printf (" "); row--; ) 8 9 10 11 12 13 Figure 6 (0) Determine how many times does the call to printf statement in line 8) are executed. [1 Mark] (1) Determine how many times does the call to printf statement (in line 11) are executed. [1 Mark] (iii) Convert the while loop into a for loop to produce the same output [4 Marks)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
