What is the output of the given statement in LISP?
* (Setf part-bins (make-array ‘(4)))
a) #Done
b) #4
c) #(0 0 0 0)
d) None of the mentioned



 What is the output of the given statement in LISP? * (Setf part-bins (make-array ‘(4)))..

Answer / chaitanya

c

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More AI Languages Interview Questions

What is meant by collection of methods the same name? a) Lisp class b) Class c) Generic function d) None of the mentioned

1 Answers  


 Explain what is prolog programming language? What is it based on?

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  


 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 makes it possible to define generic functions? a) Lisp b) CLOS c) Class d) Object-Oriented programming

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 process of creating new data types in lisp? a) List b) Structures c) Procedures d) None of the mentioned

1 Answers  


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

1 Answers  


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

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  


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

1 Answers  


 What is the output of the following statement? * (setf book (book=author-writer book ‘(guy steele))) a) Guy b) Steele c) Error d) None of the mentioned

1 Answers  


Categories