Programming Languages C Objective
Jan 03, 2013

long factorial (long x)

{
????
return x * factorial(x - 1);
}
Replace the ???? to make the function shown above return the correct answer?

Choose the correct answer:
A) if (x >= 2) return 2;
B) if (x <= 1) return 1;
C) return 1;
D) if (x == 0) return 0
Detailed Explanation

The output of the above program is option b.

Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback