Mention how many types of variables available is LISP? Explain what are the variables that are bound, and that have values assigned to them?
Answer / chaitanya
The number of variables available in LISP is two one is lexical variable, and other is special variable. The parameter of procedures is variable which are bound and have values allotted to them.
| Is This Answer Correct ? | 1 Yes | 0 No |
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 keyword is used to construct an array in LISP? a) Array b) Make-array c) Bins d) Make
Is it possible to call LISP functions from other languages?
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 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
. What is the output of the given statement? * (defstruct employee (length-of-service 0) (payment ‘salary)) * (setf employee-example (make-employee)) * (employee-length-of-service employee-example) a) T b) NIL c) 0 d) Error
What is the output of the given statement? * (defmethod area ((figure rectangle)) (* (rectangle-width figure) (rectangle-height figure))) a) Area b) Rectangle c) Height d) Error
Which is the primitive that creates new structure types in LISP? a) Defnum b) Deftype c) Defstruct d) None of the mentioned
Which hides details behind abstraction boundaries? a) Procedures b) Procedure abstraction c) Recursion d) Both a & b
Which creates reader procedures for getting things out of an instance fields? a) Structure in LISP b) Defstruct c) Class d) Object
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
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))))))
AI Algorithms (74)
AI Natural Language Processing (96)
AI Knowledge Representation Reasoning (12)
AI Robotics (183)
AI Computer Vision (13)
AI Neural Networks (66)
AI Fuzzy Logic (31)
AI Games (8)
AI Languages (141)
AI Tools (11)
AI Machine Learning (659)
Data Science (671)
Data Mining (120)
AI Deep Learning (111)
Generative AI (153)
AI Frameworks Libraries (197)
AI Ethics Safety (100)
AI Applications (427)
AI General (197)
AI AllOther (6)