This set of LISP Multiple Choice Questions & Answers (MCQs) focuses on “Data Abstraction”.
1. Which process helps to build a large and complicated programs?
a) Abstraction
b) Mapping
c) Data abstraction
d) None of the mentioned
View Answer
Explanation: Data abstraction process helps to build a large and complicated programs.
2. What is partly embedded in the knowledge of your programming for manipulating applications?
a) Programming cliches
b) Procedures
c) Abstraction
d) Data
View Answer
Explanation: The knowledge of programming is embedded partly in applicable templates called programming cliches.
3. How many items are available in mapping primitives are there?
a) 3
b) 4
c) 5
d) 6
View Answer
Explanation: There are five items in mapping primitives. They are mapcar, remove-if, remove-if-not, count-if and find-if.
4. Which makes it easy to identify the first entry encountered that satisfies a given predicate?
a) Reusing
b) Revoking
c) Template
d) Filtering
View Answer
Explanation: Filtering makes it easy to identify the first entry encountered that satisfies a given predicate.
5. How many access procedures are available in lisp?
a) 1
b) 2
c) 3
d) 4
View Answer
Explanation: The access procedures available in lisp are constructors, readers and writers.
6. What is the output of the following statement?
span class="sy0"> * (defun book-author (book) (second book)) * (setf book-example-1 '((Artificial Intelligence) (Patrick) (Technical AI))) * (book-author book-example-1)
a) Artificial Intelligence
b) Patrick
c) Technical AI
d) None of the mentioned
View Answer
Explanation: This statement will define the book author and it will reveal the author from the any statement.
Output:
(PATRICK)
7. What is the output of the following statement?
span class="sy0"> * (defun make (title author) (list (list 'title title) (list 'author author))) * (setf book (make '(Common Lisp) '(Guy steele)))
a) Common Lisp
b) Guy steele
c) Make
d) ((TITLE (COMMON LISP)) (AUTHOR (GUY STEELE)))
View Answer
Explanation: This statement will print the values according to the classification.
Output:
((TITLE (COMMON LISP)) (AUTHOR (GUY STEELE)))
8. What is the output of the following statement?
span class="sy0"> * (defun make (title author) (list (list 'title title) (list 'author author))) * (setf book (make '(Common Lisp) '(Guy steele))) * (defun book-author-writer (book author) (cons (list 'author author) book))
a) Book
b) Book-author
c) Book-author-writer
d) None of the mentioned
View Answer
Explanation: This statement will print the defined value.
Output:
BOOK-AUTHOR-WRITER
9. What is the output of the following statement?
span class="sy0"> * (setf book (book=author-writer book '(guy steele)))
a) Guy
b) Steele
c) Error
d) None of the mentioned
View Answer
Explanation: This statement will print the error because is not defined.
10. What is the output of the following statement?
span class="sy0"> * (defun (input-list) (if (endp input-list) nil (cons ( (first input-list)) ( (rest input-list)))))
a) Procedure
b) Transforming
c) Input
d) Error
View Answer
Explanation: Because the procedure is not a type of list, So it is printing a error.
Sanfoundry Global Education & Learning Series – LISP Programming Language.
To practice all areas of LISP, here is complete set of 250+ Multiple Choice Questions and Answers on LISP Programming Language.
- Check Computer Science Books
- Practice Computer Science MCQs
- Check LISP Books
- Apply for Computer Science Internship