A
Q. What will the following code print?
Code:
int fact(int n) {
if (n <= 1) return 1;
return n * fact(n - 1);
}
int main() {
printf("%d", fact(4));
return 0;
}
if (n <= 1) return 1;
return n * fact(n - 1);
}
int main() {
printf("%d", fact(4));
return 0;
}
- Correct Answer - Option(C)
- Views: 5
- Filed under category C Programming
- Hashtags:
Discusssion
Login to discuss.