Welcome Guest | Sign in | Register
Inbuilt Functions - Discussion Page For Q.10672 | C Programming Questions and Answers | C Programming Free Online-Tests | LucentBlackBoard | LucentBlackBoard.com

Home > Java Programming > Inbuilt Functions > Questions and Answers

Q: With what do you replace the ???? to make the function shown below return the correct answer?
long factorial (long x)
{
????
return x * factorial(x - 1);
}
A. if (x == 0) return 0; B. return 1;
C. if (x >= 2) return 2; D. if (x <= 1) return 1;

Answer and Explanation

Answer:if (x <= 1) return 1;

Explanation:
There is no explanation...

Comment on this Question

Name:

Loading...




Partner Sites
LucentBlackBoard.com                  SoftLucent.com                  LucentJobs.com
All rights reserved © 2012-2015 SoftLucent.