What is the output of the given statement in LISP?
* (Setf part-bins (make-array ‘(4)))
* (setf (aref part-bins 0) ‘nails);
* (setf (aref part-bins 1) ‘nuts);
* (setf (aref part-bins 2) ‘bolts)
* (setf (aref part-bins 3) ‘bike)
* (aref part-bins 2)
* (setf (aref part-bins 4) ‘car)
a) Nails
b) Nuts
c) 2
d) Error
Mention how many types of variables available is LISP? Explain what are the variables that are bound, and that have values assigned to them?
Which hides details behind abstraction boundaries? a) Procedures b) Procedure abstraction c) Recursion d) Both a & b
What is the output of the given statement? * (endp ‘(this is not empty)) a) T b) NIL c) Error d) None of the mentioned
Which is used to represent the prompt in lisp? a) # b) $ c) & d) *
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 process of reserving a place in computer memory to store a value for a symbol? a) Storing b) Ranging c) Binding d) None of the mentioned
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 value of last consequent form in the triggered clause? a) Value of the entire COND b) Trigger c) Consequent d) All of the mentioned
What is the output of the following statement? * (setf breakfast ‘(eggs bacon toast tea)) * (cond ((> (length breakfast) 10) ‘glutton) ((not (endp breakfast)) ‘normal)(t ‘anorexic)) a) Anorexic b) Breakfast c) Eggs d) Normal
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
Mention what are the three functions required by LISP?
. 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