In LISP, the function (minusp (-20 4 8 8 1) returns A. T B. F C. NIL D. -20 E. None of the above

T
F
NIL
-20 E. None of the above

The correct answer is A. T.

The function (minusp (-20 4 8 8 1)) returns T because the result of the expression (-20 4 8 8 1) is negative.

The function minusp takes two arguments and returns T if the first argument is less than the second argument, and F otherwise. In this case, the first argument is -20 and the second argument is 1. Since -20 is less than 1, the function returns T.

The other options are incorrect for the following reasons:

  • Option B: F is returned if the first argument is not less than the second argument. In this case, the first argument is -20 and the second argument is 1. Since -20 is less than 1, the function does not return F.
  • Option C: NIL is returned if the first argument is equal to the second argument. In this case, the first argument is -20 and the second argument is 1. Since -20 is not equal to 1, the function does not return NIL.
  • Option D: -20 is the first argument to the function. The function does not return the first argument.
  • Option E: None of the above is the correct answer.
Exit mobile version