What is the difference between the appearance of macro and ordinary definition in LISP?
a) Argument list
b) Reture value
c) Just the defining keyword
d) None of the mentioned
What is the output of the following statement? * (setf book (book=author-writer book ‘(guy steele))) a) Guy b) Steele c) Error d) None of the mentioned
What is the output of the given statement in LISP? * (setf abc ‘(a b c) xyz ‘(x y z)) * (setf bc (rest abc)) * bc a) A b) B c) C d) BC
Explain what is backtracking in Prolog?
Pick out the correct statement about macro. a) Macro is dependant. b) Macro is interoperable c) Macro is complex d) Macro deserve their own file
What is the output of the following statement? * (defun both-ends-with-special ()(setf whole-list (cons (first whole-list) (last whole-list)))) * (setf whole-list ‘(monday tuesday wednesday thursday friday)) * (both-ends-with-special) a) Monday b) Friday c) Wednesday d) Both a & b
Explain what is LISP? Give an example of some of the popular applications built in LISP?
What is the output of the following statement? * (defun make (title author) (list (list ‘title title) (list ‘author author))) * (setf book (make ‘(Common Lisp) ‘(Guy steele))) a) Common Lisp b) Guy steele c) Make d) ((TITLE (COMMON LISP)) (AUTHOR (GUY STEELE)))
What is the output of the given statement? * (defclass article() ((title :accessor article-title :initarg :title) (author :accessor article-author :initarg :author))) * (defclass computer-article (article) ()) * (defclass business-article (article) ()) * (defclass political-article (article) ()) * (setf articles (list (make-instance ‘business-article :title “Memory Prices down”))) a) Business article b) Political article c) Business article
How many access procedures are avilable in lisp? a) 1 b) 2 c) 3 d) 4
Which is uses their arguments to build intermediate forms and evaluating them to produce a value? a) Backquote b) Macros c) List d) Procedures
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 following statement? * ( first (rest (first ‘((a b) (c d))))) a) a b) b c) c d) d