Explain what is slot and what are the most commonly used slot options?
Answer / chaitanya
Slots are nothing but variables that stores data or fields. A slot description has the form, where each option is a keyword followed by name, expression and other options.
The most commonly used slot options are:
• :accessor function-name
• :initform expression
• :initarg symbol
Is This Answer Correct ? | 0 Yes | 0 No |
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
Is it possible to call LISP functions from other languages?
Mention why you have to use “is” instead of “=” in Prolog when it comes to applying calculation logic?
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)) * (setf (person-surname person-instance-1) ‘winston) a) Winston b) Nil c) T d) Error
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 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
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
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 in LISP? * (setf abc ‘(a b c) xyz ‘(x y z)) * abc a) A b) B c) ABC
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
Explain why matching variable is important in Prolog? What is the method to match variables?