0
What is the output of the following C program?
#include <stdio.h>
int f(int n) {
if (n <= 1) return 1;
return n * f(n - 2);
}
int main() {
printf("%d", f(7));
return 0;
}- A105
- B35
- C21
- D5040
Correct answer: A
What is the output of the following C program?
#include <stdio.h>
int f(int n) {
if (n <= 1) return 1;
return n * f(n - 2);
}
int main() {
printf("%d", f(7));
return 0;
}