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



 What is the output of the following statement? * (defun both-ends-with-special ()(setf whole-..

Answer / chaitanya

d

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More AI Languages Interview Questions

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

1 Answers  


Which exploit the fact that lisp forms are just expressions meant to be evaluated? a) List b) Procedure c) Macro d) None of the mentioned

1 Answers  


 What is the output of the given statement? * (defmethod area ((figure rectangle)) (* (rectangle-width figure) (rectangle-height figure))) a) Area b) Rectangle c) Height d) Error

1 Answers  


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

1 Answers  


Which is used to build the lisp procedures? a) Data b) Primitives c) Definition d) None of the mentioned

1 Answers  






 Explain why matching variable is important in Prolog? What is the method to match variables?

1 Answers  


Mention how many types of variables available is LISP? Explain what are the variables that are bound, and that have values assigned to them?

1 Answers  


 Mention who is referred as a Member in Prolog?

1 Answers  


 What is the output of the following statement? * (setf x ‘outside) * (let ((x ‘inside) (y x)) (list x y)) a) Outside b) Inside c) Inside Outside d) Outside Inside

1 Answers  


What is the output of the following statement? * (setf thing ‘point r 1) * (case thing (circle (*pi r r))(sphere (* 4 pi r r))) a) 1 b) 12.56637 c) NIL d) T

1 Answers  


Explain what is Local Variables?

1 Answers  


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

1 Answers  


Categories