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 |
Mention what is Cut (!) in Prolog and what is the advantage of ‘Cut’ and ‘Negation’?
Explain what is backtracking in Prolog?
Demonstrate with an example how you can code in LISP?
What is the output of the given statement in LISP? * (setf bins (make-array 2 :initial-element ‘e)) a) E b) E E c) E E E d) E E E E
Which has a template that calls for particularly peculiar argument evaluation? a) COND b) Consequent c) Trigger d) Sphere
What will happen if the value of all the test-forms are nil? a) Nothing b) COND form is nil c) Both a & b d) None of the mentioned
What is the output of the given statement in LISP? * (setf abc ‘(a b c) xyz ‘(x y z)) * (setf bc (rest abc)) * bc a) A b) B c) C d) BC
Which is used to build the lisp procedures?
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
Explain List of artificial intelligence projects?
. 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
Which forms can be constructed with the same primitives that manipulate lisp expressions? a) Lisp b) Macro c) Procedure d) Defun