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
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
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 output of the following statement? * (defun make (title author) (list (list ‘title title) (list ‘author author))) * (setf book (make ‘(Common Lisp) ‘(Guy steele))) a) Common Lisp b) Guy steele c) Make d) ((TITLE (COMMON LISP)) (AUTHOR (GUY STEELE)))
Which is used to construct new lists by linking the right pointers? a) Links b) List c) Variables d) Right pointers
What is the output of the following statement? * ‘(first (first (rest (rest ((a b) (c d) (e f)))))) a) a b) b c) ab d) (FIRST (FIRST (REST (REST ((A B) (C D) (E F))))))
Which process helps to build large and complicated programs in LISP? a) Macros b) Procedure abstraction c) Defun d) None
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
What is the general pattern that shows how the various parts of an expression fit together? a) Template b) Pattern c) Match d) Both a & b
Which is used to represent the prompt in lisp? a) # b) $ c) & d) *
. What is the output of the given statement? * (setf high 98 temperature 102) * (when (> temperature high) (setf high temperature) ‘new-record) * high a) 98 b) 102 c) new d) Error
Which notation facilitates uniformity in lisp? a) Prefix b) Postfix c) Infix d) None of the mentioned
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