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



 What is the output of the given statement in LISP? * (setf bins (make-array 2 :initial-elemen..

Answer / chaitanya

b

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More AI Languages Interview Questions

Name the sector where prolog programming language is used?

1 Answers  


 Which symbol holds the first element and also an index in LISP? a) Nail b) Tail c) Initial d) All of the mentioned

1 Answers  


Explain with an example what is “Setof” predicate in Prolog?

1 Answers  


Mention what are the three functions required by LISP?

1 Answers  


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

1 Answers  






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

1 Answers  


What is the output of the given statement in LISP? * (setf fact1 ‘(big computers are nice)) * (setf (first fact1) ‘fast) a) Big computers b) Fast c) Big computers are fast d) None of the mentioned

1 Answers  


What is the output of the following statement? * (defun book-author (book) (second book)) * (setf book-example-1 ‘((Artificial Intelligence) (Patrick) (Technical AI))) * (book-author book-example-1) a) Artificial Intelligence b) Patrick c) Technical AI d) None of the mentioned

1 Answers  


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

1 Answers  


 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  


 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

1 Answers  


 What is the output of the given statement? * (setf day-or-date ‘monday) * (if (symbolp day-or-date) ‘day ‘date) a) Monday b) Day c) Date d) None of the mentioned

1 Answers  


Categories