Lisp Syntax MCQ Questions & Answers

This section focuses on "Syntax" of LISP programming language. These Multiple Choice Questions (MCQ) should be practiced to improve the LISP skills required for various interviews (campus interviews, walk-in interviews, company interviews), placements, entrance exams and other competitive examinations.

1. How many basic building blocks LISP is made up of?

A. 2
B. 3
C. 4
D. 5

View Answer


2. A list is a sequence of atoms and/or other lists enclosed in ?

A. {}
B. []
C. ()
D. ||

View Answer


3. A ________ is a group of characters enclosed in double quotation marks.

A. list
B. array
C. atom
D. string

View Answer


4. Which of the following is used for indicating a comment line?

A. "
B.
C. ;
D. #

View Answer


5. Which of the following is numeric operations in LISP?

A. -
B. *
C. /
D. All of the above

View Answer


6. LISP expressions are case-insensitive?

A. TRUE
B. FALSE
C. Can be true or false
D. Can not say

View Answer


7. A Naming Conventions in LISP can have digit in it?

A. Yes
B. No
C. Can be yes or no
D. Can not say

View Answer


8. An _______ is a number or string of contiguous characters.

A. list
B. atom
C. array
D. None of the above

View Answer


9. Which of this is a correct syntax for defining a function in LISP?

A. (defun (tempfunc) (x) (+ x 1))
B. (define tempfunc (x) (+ x 1))
C. (defun tempfunc (x) (+ x 1))
D. (def tempfunc (x) (+ x 1))

View Answer


10. What does the cdr function return in LISP?

A. The first element of the list
B. The second element of the list
C. The list without the first element
D. The last element of the list

View Answer





Discussion



* You must be logged in to add comment.