What is the output of the given statement in LISP?
* (setf bins (make-array 4 :initial-element ‘e))
* (aref bins 0)
a) E
b) 0
c) 4
d) None of the mentioned
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 given statement in LISP? * (setf abc ‘(a b c) xyz ‘(x y z)) * (setf bc (rest abc)) * bc a) A b) B c) C d) BC
How many access procedures are avilable in lisp? a) 1 b) 2 c) 3 d) 4
Demonstrate with an example how you can code in LISP?
Pick out the correct statement about macro. a) Macro is dependant. b) Macro is interoperable c) Macro is complex d) Macro deserve their own file
What is the output of the given statement? * (defun when-plusp-with-bug (number result); (when (plusp number) result)); * (setf pressure -2) * (when-plusp-with-bug pressure (print ‘alarm)) a) Alarm b) Nil c) Both a & b d) None of the mentioned
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 given statement in LISP? * (setf part (make-array ‘(8 8))) a) 8 b) 0 0 0 0 0 0 0 0 c) 0 0 0 0 d) 8 rows of 0
What are the variables that are bound and that have values assigned to them? a) Data b) Variable c) Parameters d) None of the mentioned
Which process helps to build large and complicated programs in LISP? a) Macros b) Procedure abstraction c) Defun d) None
Which exploit the fact that lisp forms are just expressions meant to be evaluated? a) List b) Procedure c) Macro d) None of the mentioned
. 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