What is the output of the given statement in LISP?
* (Setf part-bins (make-array ‘(4)))
* (setf (aref part-bins 0) ‘nails);
* (setf (aref part-bins 1) ‘nuts);
* (setf (aref part-bins 2) ‘bolts)
* (setf (aref part-bins 3) ‘bike)
* (aref part-bins 2)
* (setf (aref part-bins 4) ‘car)
a) Nails
b) Nuts
c) 2
d) Error



 What is the output of the given statement in LISP? * (Setf part-bins (make-array ‘(4)))..

Answer / chaitanya

d

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More AI Languages Interview Questions

Which is used to represent the prompt in lisp? a) # b) $ c) & d) *

1 Answers  


 What is the output of the given statement in LISP? * (setf l1 (list ‘a ‘b ‘c)) * (setf l2 (list ‘a ‘b)) * (setf l1 l2) a) A B b) A B C c) B C d) None of the mentioned

1 Answers  


Explain List of artificial intelligence projects?

0 Answers  


Explain what is slot and what are the most commonly used slot options?

1 Answers  


 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  






 Which class can help to select a method? a) Nonoptional argument b) Class c) Method d) None of the method

1 Answers  


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

1 Answers  


Mention why you have to use “is” instead of “=” in Prolog when it comes to applying calculation logic?

1 Answers  


Demonstrate with an example how you can code in LISP?

1 Answers  


Name the sector where prolog programming language is used?

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  


Which makes it possible to define generic functions? a) Lisp b) CLOS c) Class d) Object-Oriented programming

1 Answers  


Categories