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 meant by collection of methods the same name? a) Lisp class b) Class c) Generic function d) None of the mentioned
Explain what is prolog programming language? What is it based on?
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
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
Which makes it possible to define generic functions? a) Lisp b) CLOS c) Class d) Object-Oriented programming
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
What is the process of creating new data types in lisp? a) List b) Structures c) Procedures d) None of the mentioned
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
Explain what is the difference between bagof/3 and setof/3 predicate in Prolog?
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
Which keyword is used to define macro procedures in LISP? a) Defun b) Demacro c) Defmacro d) None of the mentioned
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