0
What is the output of the following C program?
#include <stdio.h>
void f(int n) {
if (n == 0) return;
printf("%d", n % 2);
f(n / 2);
}
int main() { f(13); return 0; }- A1011
- B1101
- C1110
- D0111
Correct answer: A
What is the output of the following C program?
#include <stdio.h>
void f(int n) {
if (n == 0) return;
printf("%d", n % 2);
f(n / 2);
}
int main() { f(13); return 0; }