Solved

The Function Int Fact(int K)

Question 9

Multiple Choice

The function int fact(int k)
{
Return k*fact(k-1) ;
If (k==0) return 1;
}


A) computes the factorial on an integer k passed to it as parameter.
B) returns the value 1 if it is passed a value of 0 for the parameter k.
C) does not correctly handle its base case.
D) works for all non-negative values of k, but not for negative numbers.
E) None of the above

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions