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

Which type of file cannot be viewed in a text editor such as Notepad?

a. text file b. output file c. input file d. binary file

Computer Science & Information Technology

(A) A field that uniquely identifies each record.The requirement that no record may have a null primary key and that entries for primary keys be unique is called the

(A) Rule of Referential Integrity. (B) Rule of Primary Keys. (C) Rule of Entity Integrity. (D) Rule of Null Values.

Computer Science & Information Technology

The term __________ refers to a digital signature scheme that involves only the communicating parties.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

What does the following SELECT statement do?

SELECT Age FROM People WHERE LastName = 'Purple' a) It selects the age of the person (or people) with the last name Purple from the People table. b) It selects the value Purple from the Age table of the People database. c) It selects the age of the person with the last name Purple from the People database. d) It selects the People field from the Age table with the LastName value Purple.

Computer Science & Information Technology