What is the output of the following statement?
* (setf meals ‘(breakfast lunch tea dinner))
* (cons (first meals) (last meals))
a) Breakfast
b) Lunch
c) Dinner
d) Both a & c



 What is the output of the following statement? * (setf meals ‘(breakfast lunch tea dinn..

Answer / chaitanya

d

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More AI Languages Interview Questions

 Which primitive removes all but the last element from the list? a) Last b) First c) Remove d) Revoke

1 Answers  


 Why in prolog it is said that Program and Data are the same thing?

1 Answers  


 Which process helps to build large and complicated programs in LISP? a) Macros b) Procedure abstraction c) Defun d) None 

1 Answers  


Which do not evaluate their arguments in LISP? a) List b) Procedure c) Setf d) Macros

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  






 How many items are available in mapping primitives are there? a) 3 b) 4 c) 5 d) 6

1 Answers  


 Mention what are the two pre-defined packages used in LISP?

1 Answers  


What is a data type in which expressions are stored in places identified by integer indexes in LISP? a) Structure b) List c) Array d) None of the mentioned

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)) * (person-personality person-instance-2) a) Female b) Nice c) Person d) Both a & b

1 Answers  


How many types of variables are available in lisp? a) 1 b) 2 c) 3 d) 4

1 Answers  


 What is the process of creating new data types in lisp? a) List b) Structures c) Procedures d) None of the mentioned

1 Answers  


Explain what is List structures in Prolog?

1 Answers  


Categories