Which can build new lists by depositing pointers in free boxes?
a) Do
b) Dobuild
c) Cons
d) None of the mentioned
What is the output of the following statement? * (setf meals ‘(breakfast lunch tea dinner)) * (cons (first meals) (last meals)) a) Breakfast b) Lunch c) Dinner d) Both a & c
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
Which do not evaluate their arguments in LISP? a) List b) Procedure c) Setf d) Macros
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
Mention what are the three functions required by LISP?
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 should be used with structure names with a combination? a) Make- b) Make c) Create d) Deploy
Explain what is a predicate in LISP?
How the clause is called if it contains a test, as well as zero or more additional forms in LISP? a) Conditional b) Consequents c) Clause 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)) * (person-p ‘(this is a list — not a person instance)) a) Female b) Nice c) T d) Nil
What is the output of the following statement? * (cdr ‘(a b c)) a) a b) B c) (B C) D) None of the mentioned
Explain what is SWI-Prolog?