What is the output of the given statement in LISP?
* (setf l1 (list ‘a ‘b ‘c))
* (setf l2 (list ‘a ‘b))
* (setf l1 l2)
a) A B
b) A B C
c) B C
d) None of the mentioned
Which can be represented in bytes in LISP? a) Boxes and pointers b) Lists c) Lisp d) None of the mentioned
What is the output of the given statement? * (defmethod area ((figure rectangle)) (* (rectangle-width figure) (rectangle-height figure))) a) Area b) Rectangle c) Height d) Error
Which exploit the fact that lisp forms are just expressions meant to be evaluated? a) List b) Procedure c) Macro d) None of the mentioned
What is the output of the given statement? * (defclass article() ((title :accessor article-title :initarg :title) (author :accessor article-author :initarg :author))) a) Article b) c) d) None of the mentioned
Which enables storage in procedurally indexed places in LISP? a) Defstruct b) Object c) Structure d) None of the mentioned
What is the output of the given statement? * (defstruct circle (radius 0)) * (defun area (figure) (cond ((circle-p figure) (* pi (expt (circle-radius figure) 2))))) * (setf circle (make-circle :radius 11)) * (area circle) a) 44 b) 380 c) 382 d) 380.132
Why LISP is used for Artificial Intelligence?
What is the output of the following statement? *(setf thing ‘sphere r 1) * (cond ((eq thing ‘circle) (* pi r r)) ((* 4 pi r r))) a) 10.566 b) 11.5683 c) 12.56637 d) 13
Explain what is a predicate in LISP?
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
Which symbol holds the first element and also an index in LISP? a) Nail b) Tail c) Initial d) All of the mentioned
Explain with an example what is “Setof” predicate in Prolog?