Consider the code fragment below : #include <stdio.h> void f(int n) { if (n <=…
PYQ GATE 2008
Consider the code fragment below :
#include <stdio.h>
void f(int n) {
if (n <= 1) {
printf("%d", n);
} else {
f(n / 2);
printf("%d", n % 2);
}
}
What does f(173) print?
- A.
010110101
- B.
010101101
- C.
10110101
- D.
10101101
Attempted by 270 students.
Sign up free to check your answer
Sign up freeLoading lesson…

