What is the output of the following statement?
* ( first (rest (first ‘((a b) (c d)))))
a) a
b) b
c) c
d) d



 What is the output of the following statement? * ( first (rest (first ‘((a b) (c d)))))..

Answer / chaitanya

b

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More AI Languages Interview Questions

 What is the output of the following statement? * (setf breakfast ‘(eggs bacon toast tea)) * (cond ((> (length breakfast) 10) ‘glutton) ((not (endp breakfast)) ‘normal)(t ‘anorexic)) a) Anorexic b) Breakfast c) Eggs d) Normal

1 Answers  


 Explain why PROLOG language is stated as a procedural language?

1 Answers  


 Mention what is the difference between = and = = in Prolog?

1 Answers  


Explain what is CLOS in LISP? What are the goals of the common lisp object system?

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  






Explain what is the difference between bagof/3 and setof/3 predicate in Prolog?

1 Answers  


 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

1 Answers  


What will happen if the value of all the test-forms are nil? a) Nothing b) COND form is nil c) Both a & b d) None of the mentioned

1 Answers  


What is the output of the following statement? * (defun (input-list) (if (endp input-list) nil (cons ( (first input-list)) ( (rest input-list))))) a) Procedure b) Transforming c) Input d) Error

1 Answers  


What is the difference between the appearance of macro and ordinary definition in LISP? a) Argument list b) Reture value c) Just the defining keyword d) None of the mentioned

1 Answers  


 Mention who is referred as a Member in Prolog?

1 Answers  


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

1 Answers  


Categories