How data types are categorized in LISP?
Answer / chaitanya
In LISP, data types are categorized as
• Scalar Types: Number types, Characters, Symbols, etc.
• Data Structure: list, vectors, bit-vectors and strings
Is This Answer Correct ? | 0 Yes | 0 No |
Explain what is the importance of the hash table in LISP?
What is the output of the following statement? * (setf thing ‘point r 1) * (case thing (circle (*pi r r))(sphere (* 4 pi r r))) a) 1 b) 12.56637 c) NIL d) T
What is the output of the given statement? * (setf pressure 3) * (when-plusp pressure (print ‘alarm)); a) Alarm b) Alarm Alarm c) 1 d) Nil
Which hides details behind abstraction boundaries? a) Procedures b) Procedure abstraction c) Recursion d) Both a & b
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
Explain what is a predicate in LISP?
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
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 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 is the other name of boxes in LISP? a) Cons cells b) Conses c) Both a & b d) None of the mentioned
Mention what are the three functions required by LISP?
What is the output of the following statement? *(setf thing ‘sphere r 1) * (cond ((eq thing ‘circle) (* pi r r)) ((* 4 pi r r))) a) 10.566 b) 11.5683 c) 12.56637 d) 13