What is the output of the following statement?
* ‘(first (first (rest (rest ((a b) (c d) (e f))))))
a) a
b) b
c) ab
d) (FIRST (FIRST (REST (REST ((A B) (C D) (E F))))))



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

Answer / chaitanya

d

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More AI Languages Interview Questions

Which checks the evaluated key form against the unevaluated keys using EQL? a) COND b) CASE c) NIL d) SETF

1 Answers  


 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

1 Answers  


Explain what is List structures in Prolog?

1 Answers  


Mention what is Cut (!) in Prolog and what is the advantage of ‘Cut’ and ‘Negation’?

1 Answers  


 What is the output of the following statement? * (+ 3.14 2.71) a) 3.14 b) 2.71 c) 5.84 d) 5.85

1 Answers  






 What is the output of the following statement? * (cdr ‘(a b c)) a) a b) B c) (B C) D) None of the mentioned

1 Answers  


Which is used to build the lisp procedures?

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-p ‘(this is a list — not a person instance)) a) Female b) Nice c) T d) Nil

1 Answers  


 Is it possible to call LISP functions from other languages?

1 Answers  


Demonstrate with an example how you can code in LISP?

1 Answers  


 Explain what is recursion in Prolog?

1 Answers  


Explain what is backtracking in Prolog?

1 Answers  


Categories