Home / CSE MCQs / LISP ::

CSE MCQs :: LISP

  1. Which predicate tests to see if its first argument is an element of its second argument?
  2. A.
    EQ
    B.
    =
    C.
    MEMBER
    D.
    None of the mentioned

  3. What are the three functions required by LISP?
  4. A.
    Name of the function
    B.
    Parameters of the function
    C.
    Body of the function
    D.
    All of these

  5. What is the output of the following statement?

    span class="sy0"> * (mapcar #'= '(1 2 3) '(3 2 1))
  6. A.
    NIL T NIL
    B.
    T NIL
    C.
    T NIL T
    D.
    None of the mentioned

  7. Which is used to produce a procedure object from a procedure name?
  8. A.
    EQ
    B.
    #
    C.
    EQUAL
    D.
    None of the mentioned

  9. The original LISP machines produced by both LMI and Symbolics were based on research performed at:
  10. A.
    CMU
    B.
    MIT
    C.
    Stanford University
    D.
    RAMD

  11. What is the output of the given statement?
    *(setf sentence '(a rough road leads to stars))
    *(member 'stars sentence)
  12. A.
    Stars
    B.
    Road
    C.
    Sentence
    D.
    Leads

  13. What is the programming structure for LISP?
  14. A.
    Atom
    B.
    Lists
    C.
    String
    D.
    All of these

  15. Which forms offer an alternative to the recursive transformation cliche?
  16. A.
    Mapcar
    B.
    Maplist
    C.
    Mapdata
    D.
    All of the mentioned

  17. What is the output of the following statement?

    span class="sy0"> * (mapcar #'oddp '(1 2 3))
  18. A.
    T NIL
    B.
    NIL
    C.
    T
    D.
    T NIL T

  19. What is the output of the given statement?

    span class="sy0"> * (setf pairs '((maple shade) (apple fruit)))
    * (member '(maple shade) pairs)
  20. A.
    Shade
    B.
    Maple
    C.
    T
    D.
    Nil