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
What is the value of last consequent form in the triggered clause? a) Value of the entire COND b) Trigger c) Consequent d) All of the mentioned
What is the output of the following statement? * ‘(first (first (rest (rest ((a b) (c d) (e f)))))) a) a b) b c) ab d) (FIRST (FIRST (REST (REST ((A B) (C D) (E F))))))
What is the output of the following statement in LISP? * (setf thing ‘point r 1) * (case thing (circle (*pi r r))(sphere (* 4 pi r r)) (otherwise 0)) a) 1 b) 0 c) 12.566 d) None of the mentioned
Explain what is the difference between bagof/3 and setof/3 predicate in Prolog?
Which require sophisticated precedence compputation? a) Superclass b) Multiple Superclass c) Subclass d) None of the mentioned
Explain what is a predicate in LISP?
Explain where you use + operator in Prolog?
Which keyword is used to define the method? a) Defun b) Destruct c) Demake d) Defmethod
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 should be used with structure names with a combination? a) Make- b) Make c) Create d) Deploy
Explain why matching variable is important in Prolog? What is the method to match variables?
What is the output of the following statement? * (defun (input-list) (if (endp input-list) nil (cons ( (first input-list)) ( (rest input-list))))) a) Procedure b) Transforming c) Input d) Error