Vidyalelo
Data Structure · Q883

Miscellaneous on Data Structures

Programming · Data Structure · question 883

Q883

What is the output of the following code? int fact(int n) if(n == 0) return 1; return n * fact(n - 1); int main() int n = 0; int ans = fact(n); printf("%d",ans); return 0;

A.
0
B.
1
Answer
C.
2
D.
3

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board