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


C) does not correctly handle its base case.

Computer Science & Information Technology

You might also like to view...

What would you use to mark the parent in a description list?

a. dl b. dt c. dd d. li e. None of the above.

Computer Science & Information Technology

Physics engines include software that will react to a collision when it occurs.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

If a value in a formula is not available, the error value #VALUE! will display in the cell.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

What is the maximum recommended one-way delay for voice traffic?

a. 25 ms b. 75 ms c. 125 ms d. 150 ms

Computer Science & Information Technology