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 output of the given statement? * (defstruct circle (radius 0)) * (defun area (fi..

Answer / chaitanya

d

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More AI Languages Interview Questions

 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

1 Answers  


 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))))))

1 Answers  


 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

1 Answers  


Explain what is the difference between bagof/3 and setof/3 predicate in Prolog?

1 Answers  


 Which require sophisticated precedence compputation? a) Superclass b) Multiple Superclass c) Subclass d) None of the mentioned

1 Answers  






Explain what is a predicate in LISP?

1 Answers  


 Explain where you use + operator in Prolog?

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 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)))

1 Answers  


 What should be used with structure names with a combination? a) Make- b) Make c) Create d) Deploy

1 Answers  


 Explain why matching variable is important in Prolog? What is the method to match variables?

1 Answers  


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

1 Answers  


Categories