Lisp Data Type MCQs
This section focuses on "Data Type" in 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. In LISP?
A. variables are typed
B. variables are not typed
C. data objects not typed
D. Both B and C
View Answer
Ans : B
Explanation: In LISP, variables are not typed, but data objects are.
2. Which of the following is type specifiers in LISP?
A. array
B. function
C. ratio
D. All of the above
View Answer
Ans : D
Explanation: All of the above are type of Specifiers in LISP.
3. Which of the following is right syntax in LISP?
A. (set n 123.78)
B. (lisp n 123.78)
C. (setq n 123.78)
D. All of the above
View Answer
Ans : C
Explanation: (setq n 123.78) is right syntax in LISP
4. The ________ predicate is used for finding whether an object belongs to a specific type.
A. type
B. typeof
C. typep
D. None of the above
View Answer
Ans : C
Explanation: The typep predicate is used for finding whether an object belongs to a specific type.
5. The ___________ function returns the data type of a given object.
A. type
B. type-of
C. typen
D. typeof
View Answer
Ans : B
Explanation: The type-of function returns the data type of a given object.
6. Which of the following are example of scalar data type?
A. number
B. character
C. symbol
D. All of the above
View Answer
Ans : D
Explanation: Number, character, symbol are example of scalar data type
7. Which of the following are example of data structures?
A. lists
B. strings
C. vector
D. All of the above
View Answer
Ans : D
Explanation: lists, vectors, bit-vectors, and strings are example of data structures.
8. Any variable can take any LISP object as its value, unless you have declared it explicitly.
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : A
Explanation: Any variable can take any LISP object as its value, unless you have declared it explicitly.
9. Can you create your own data types?
A. Yes
B. No
C. Can be yes or no
D. Can not say
View Answer
Ans : A
Explanation: Yes, you can create your own data types
10. ________ data type is used for a sequence of characters in Lisp.
A. Integer
B. Symbol
C. String
D. List
View Answer
Ans : C
Explanation: String data type is used for a sequence of characters in Lisp.
Discussion