What is the output of the following statement?
* (setf whole-list ‘(monday tuesday wednesday thursday friday))
* (defun both-ends ()(setf whole-list (cons (first whole-list) (last whole-list))))
a) Monday
b) BOTH-ENDS
c) Friday Monday
d) Monday Friday



What is the output of the following statement? * (setf whole-list ‘(monday tuesday wednesday ..

Answer / chaitanya

b

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More AI Languages Interview Questions

 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))) * (defun book-author-writer (book author) (cons (list ‘author author) book)) a) Book b) Book-author c) Book-author-writer d) None of the mentioned

1 Answers  


Which has a template that calls for particularly peculiar argument evaluation? a) COND b) Consequent c) Trigger d) Sphere

1 Answers  


Explain what is Local Variables?

1 Answers  


 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? * (setf x ‘outside) * (let ((x ‘inside) (y x)) (list x y)) a) Outside b) Inside c) Inside Outside d) Outside Inside

1 Answers  






 Which is the primitive that creates new structure types in LISP? a) Defnum b) Deftype c) Defstruct d) None of the mentioned

1 Answers  


What is the output of the given statement in LISP? * (setf abc ‘(a b c) xyz ‘(x y z)) * abc a) A b) B c) ABC

1 Answers  


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

1 Answers  


Demonstrate with an example how you can code in LISP?

1 Answers  


What is the output of the given statement? * (defstruct person (sex nil) (personality ‘nice)) * (setf person-instance-1 (make-person)) * (setf person-instance-2 (make-person :sex ‘female)) a) Person :sex female :personality nice b) Person :sex c) Sex:Female d) None of the mentioned

1 Answers  


 What is the output of the given statement? * (setf day-or-date ‘monday) * (if (symbolp day-or-date) ‘day ‘date) a) Monday b) Day c) Date d) None of the mentioned

1 Answers  


 What is the output of the given statement? * (evenp (* 10 8 6 4 2)) a) T b) F c) NIL d) All of the mentioned

1 Answers  


Categories