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



 What is the output of the following statement? * (defun make (title author) (list (list &lsqu..

Answer / chaitanya

c

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More AI Languages Interview Questions

Mention how many types of variables available is LISP? Explain what are the variables that are bound, and that have values assigned to them?

1 Answers  


Which forms can be constructed with the same primitives that manipulate lisp expressions? a) Lisp b) Macro c) Procedure d) Defun

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  


What is the difference between the appearance of macro and ordinary definition in LISP? a) Argument list b) Reture value c) Just the defining keyword d) None of the mentioned

1 Answers  


Explain what is backtracking in Prolog?

1 Answers  






Which do not evaluate their arguments in LISP? a) List b) Procedure c) Setf d) Macros

1 Answers  


 Explain what is the property list 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)) * (person-p ‘(this is a list — not a person instance)) a) Female b) Nice c) T d) Nil

1 Answers  


Which keyword is used to define macro procedures in LISP? a) Defun b) Demacro c) Defmacro d) None of the mentioned

1 Answers  


 Why in prolog it is said that Program and Data are the same thing?

1 Answers  


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

1 Answers  


Which is used to represent the prompt in lisp? a) # b) $ c) & d) *

1 Answers  


Categories