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



What is the output of the following statement? * (defun (input-list) (if (endp input-list) nil (con..

Answer / chaitanya

d

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More AI Languages Interview Questions

 What is the output of the given statement? * (defstruct circle (radius 0)) * (defun area (figure) (cond ((circle-p figure) (* pi (expt (circle-radius figure) 2))))) * (setf circle (make-circle :radius 11)) * (area circle) a) 44 b) 380 c) 382 d) 380.132

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 what is LISP constants?

1 Answers  


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

1 Answers  


Explain what is Local Variables?

1 Answers  






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

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  


Explain what is LISP? Give an example of some of the popular applications built in LISP?

1 Answers  


 What is the programming structure for LISP?

1 Answers  


What is the output of the given statement? * (setf toss ‘(heads tails tails tails heads tails)) * (delete ‘heads toss) * toss a) Heads tails b) Heads tails tails tails tails c) Heads d) None of the mentioned

1 Answers  


 What is the output of the given statement? * (defstruct triangle (base 0) (altitude 0)) * (defun area (figure) (cond ((triangle-p figure) (* 1/2 (triangle-base figure) (triangle-altitude figure))))) * (setf triangle (make-triangle :base 2 :altitude 3)) * (area triangle) a) Triangle b) 7 c) 6 d) 10

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)) a) Person :sex female :personality nice b) Person :sex c) Sex:Female d) None of the mentioned

1 Answers  


Categories