What is the output of the given statement?
* (defun when-plusp-with-bug (number result);
(when (plusp number) result));
* (setf pressure -2)
* (when-plusp-with-bug pressure (print ‘alarm))
a) Alarm
b) Nil
c) Both a & b
d) None of the mentioned



 What is the output of the given statement? * (defun when-plusp-with-bug (number result); (wh..

Answer / chaitanya

c

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More AI Languages Interview Questions

What is the output of the given statement? * (defstruct person (sex nil) (personality ‘nice)) * (setf person-instance-1 (make-person)) * (setf person-instance-2 (make-person :sex ‘female)) a) Person :sex female :personality nice b) Person :sex c) Sex:Female d) None of the mentioned

1 Answers  


Explain what is LISP? Give an example of some of the popular applications built in LISP?

1 Answers  


Explain what is a predicate in LISP?

1 Answers  


 Explain what is the property list in LISP?

1 Answers  


Which is present in the writer procedure for arrays in LISP? a) Setf b) Aref c) Fref d) Both a & b

1 Answers  






 What is the output of the following statement? * (cdr ‘(a b c)) a) a b) B c) (B C) D) None of the mentioned

1 Answers  


 What is the output of the given statement? * (defun when-plusp-with-bug (number result); (when (plusp number) result)); * (setf pressure -2) * (when-plusp-with-bug pressure (print ‘alarm)) a) Alarm b) Nil c) Both a & b d) None of the mentioned

1 Answers  


What is the output of the given statement? * (defstruct person (sex nil) (personality ‘nice)) * (setf person-instance-1 (make-person)) * (setf person-instance-2 (make-person :sex ‘female)) * (person-p ‘(this is a list — not a person instance)) a) Female b) Nice c) T d) Nil

1 Answers  


Mention how many types of variables available is LISP? Explain what are the variables that are bound, and that have values assigned to them?

1 Answers  


Which makes it possible to define generic functions? a) Lisp b) CLOS c) Class d) Object-Oriented programming

1 Answers  


Which keyword is used to define the method? a) Defun b) Destruct c) Demake d) Defmethod

1 Answers  


What is the output of the following statement? * (defun book-author (book) (second book)) * (setf book-example-1 ‘((Artificial Intelligence) (Patrick) (Technical AI))) * (book-author book-example-1) a) Artificial Intelligence b) Patrick c) Technical AI d) None of the mentioned

1 Answers  


Categories