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 following statement? * (cdr ‘(a b c)) a) a b) B c) (B C) D) None of the mentioned

1 Answers  


Mention what is the difference between Prolog and normal programming language?

1 Answers  


 Is it possible to call LISP functions from other languages?

1 Answers  


 Which hides details behind abstraction boundaries? a) Procedures b) Procedure abstraction c) Recursion d) Both a & b

1 Answers  


 Which is uses their arguments to build intermediate forms and evaluating them to produce a value? a) Backquote b) Macros c) List d) Procedures

1 Answers  






How many access procedures are avilable in lisp? a) 1 b) 2 c) 3 d) 4

1 Answers  


 Explain what is setq is used for in LISP?

1 Answers  


What is the output of the following statement? * (setf whole-list ‘(monday tuesday wednesday thursday friday)) * (defun both-ends ()(setf whole-list (cons (first whole-list) (last whole-list)))) a) Monday b) BOTH-ENDS c) Friday Monday d) Monday Friday

1 Answers  


 Which is the primitive that creates new structure types in LISP? a) Defnum b) Deftype c) Defstruct d) None of the mentioned

1 Answers  


Explain List of programming languages for artificial intelligence?

0 Answers  


 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

1 Answers  


Which is used to construct new lists by linking the right pointers? a) Links b) List c) Variables d) Right pointers

1 Answers  


Categories