Determine what the following program prints. (10) #include <stdio.h> main () f i
ID: 3639707 • Letter: D
Question
Determine what the following program prints. (10)#include <stdio.h>
main ()
f int r, t, m;
scanf("%d", &r); /* Enter the last four digits of your roll number as r */
printf("r = %d ", r);
m = 0;
while (r > 0) f t = r % 10;
if (t > m) m = t;
r = r / 10;
gprintf("m = %d ", m);
g
Write your answer in the space below this line:
r =
m =
Description in one sentence:
Explanation / Answer
2. Determine what the following program prints. (10) #include main () f int r, t, m; scanf("%d", &r); /* Enter the last four digits of your roll number as r */ printf("r = %d ", r); m = 0; while (r > 0) f t = r % 10; if (t > m) m = t; r = r / 10; gprintf("m = %d ", m); g Write your answer in the space below this line: r = 1331 m = 3Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.