Vidyalelo
Data Structure · Q114

Miscellaneous on Data Structures

Programming · Data Structure · question 114

Q114

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 = 1; 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