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



What is the output of the given statement? * (defstruct person (sex nil) (personality ‘nice))..

Answer / chaitanya

a

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More AI Languages Interview Questions

 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

1 Answers  


Demonstrate with an example how you can code in LISP?

1 Answers  


 What is a symbol thought of as a name for a place to store value? a) Data b) Variable c) Parameters d) None of the mentioned

1 Answers  


 Explain what is prolog programming language? What is it based on?

1 Answers  


Which is used to build the lisp procedures? a) Data b) Primitives c) Definition d) None of the mentioned

1 Answers  






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

2 Answers  


 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

1 Answers  


Which abstractions have a prescribed behavior? a) Auxiliary procedures b) Procedure abstraction c) Primary procedures d) None of the mentioned

1 Answers  


Mention how many types of variables available is LISP? Explain what are the variables that are bound, and that have values assigned to them?

1 Answers  


 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

1 Answers  


 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

1 Answers  


 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))))))

1 Answers  


Categories