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...

In SharePoint, folders can contain up to ________ items

Fill in the blank(s) with correct word

Computer Science & Information Technology

Which interior intrusion detection system (IIDS) sensor uses heat radiation to detect intruders?

a. Ultrasonic. b. Microwave. c. Passive infrared. d. Dual-phenomenology.

Computer Science & Information Technology