In LISP, the function returns t if is even and nil otherwise: A. (evenp ) B. (even ) C. (numeven ) D. (numnevenp ) E. None of the above

[amp_mcq option1=”(evenp )” option2=”(even )” option3=”(numeven )” option4=”(numnevenp ) E. None of the above” correct=”option1″]

The correct answer is A. (evenp ).

The function (evenp ) returns t if the integer is even and nil otherwise.

The function (even ) returns t if the integer is even and nil otherwise, but it also returns t if the integer is zero.

The function (numeven ) returns the number of even numbers less than or equal to the integer.

The function (numnevenp ) returns the number of odd numbers less than or equal to the integer.

Here is an example of how to use the function (evenp ):

(evenp 2) => t
(evenp 3) => nil
(evenp 0) => t

Exit mobile version