Explain the purpose of each segment marked
(i) to (vi) of the following program. What this program will do? (i) int i; int marks[20];
(ii) for (i=0; i<20; i++) {
(iii) printf (“Enter the number”); scanf (“%d”, &marks [i];
(iv)if (marks[i] < 40) printf("Not Successful");
(v) if (marks[i] >= 40) && (marks[i] < 60)) printf("Passed in Second Division);
(vi)if (marks[i] >= 60 printf("Passed in First Division); }
(i) to (vi) of the following program. What this program will do? (i) int i; int marks[20];
(ii) for (i=0; i<20; i++) {
(iii) printf (“Enter the number”); scanf (“%d”, &marks [i];
(iv)if (marks[i] < 40) printf("Not Successful");
(v) if (marks[i] >= 40) && (marks[i] < 60)) printf("Passed in Second Division);
(vi)if (marks[i] >= 60 printf("Passed in First Division); }
0 टिप्पणियाँ:
Post a Comment