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



 What is the output of the given statement in LISP? * (setf l1 (list ‘a ‘b ‘..

Answer / chaitanya

a

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More AI Languages Interview Questions

 Which can be represented in bytes in LISP? a) Boxes and pointers b) Lists c) Lisp d) None of the mentioned

1 Answers  


 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

1 Answers  


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

1 Answers  


 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

1 Answers  


Which enables storage in procedurally indexed places in LISP? a) Defstruct b) Object c) Structure d) None of the mentioned

1 Answers  






 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

1 Answers  


Why LISP is used for Artificial Intelligence?

1 Answers  


 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

1 Answers  


Explain what is a predicate in LISP?

1 Answers  


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

0 Answers  


 Which symbol holds the first element and also an index in LISP? a) Nail b) Tail c) Initial d) All of the mentioned

1 Answers  


Explain with an example what is “Setof” predicate in Prolog?

1 Answers  


Categories