Generic selectors
Exact matches only
Search in title
Search in content
Search in posts
Search in pages
Filter by Categories
nmims post
Objective Type Set
Online MCQ Assignment
Question Solution
Solved Question
Uncategorized

1. Which makes the data to easily transform lists?
a) Car
b) Mapcar
c) Map
d) Maplist

View Answer

Answer: b [Reason:] Mapcar primitive makes the data to transform lists.

2. To which procedure does mapcar is not restricted?
a) List
b) Datachar
c) Procedure of one parameter
d) None of the mentioned

View Answer

Answer: c [Reason:] The procedure mapcar uses is not restricted to be procedure of one parameter.

3. Which forms offer an alternative to the recursive transformation cliche?
a) Mapcar
b) Maplist
c) Mapdata
d) All of the mentioned

View Answer

Answer: a [Reason:] Mapcar forms offer an alternative to the recursive transformation cliche.

4. How many procedures are available in lists to filter them?
a) 1
b) 2
c) 3
d) 4

View Answer

Answer: b [Reason:] The two procedures available to filter lists are remove-if and remove-if-not.

5. Which enables to define procedures that have procedure arguments?
a) Funargs
b) Mapcar
c) Fun
d) Funcall

View Answer

Answer: b [Reason:] None.

6. What is the output of the following statement?

span class="sy0"> * (mapcar #'oddp '(1 2 3))

a) T NIL
b) NIL
c) T
d) T NIL T

View Answer

Answer: d [Reason:] This statement will print odd numbers as true and all the even numbers as false. Output: (T NIL T)

7. What is the output of the following statement?

span class="sy0"> * (funcall #'first '(e1 e2 e3)) (first '(e1 e2 e3))

a) E1
b) E1 * E1
c) *
d) None of the mentioned

View Answer

Answer: b [Reason:] This statement will print first procedure argument from both the lists. Output: E1 * E1

8. What is the output of the following statement?

span class="sy0"> * (mapcar #'= '(1 2 3) '(3 2 1))

a) NIL T NIL
b) T NIL
c) T NIL T
d) None of the mentioned

View Answer

Answer: a [Reason:] This statement will compare the values from both the lists and print the result. Output: (NIL T NIL)

9. What is the output of the following statement?

span class="sy0"> * (apply #'+ 1 2 3 '(4 5 6))

a) 43
b) 444
c) 32
d) 21

View Answer

Answer: d [Reason:] This statement will add all the values given in the list. Output: 21

10. What is the output of the following statement?

span class="sy0"> * (funcall #'append '(a b) '(x y)) (append '(a b) '(x y))

a) (A B X Y) * (A)
b) (A B X Y) * (A B)
c) (A B X Y) * (A B C Y)
d) (A B X Y) * (A B X Y)

View Answer

Answer: d [Reason:] This statement will append the values from both the lists. Output: (A B X Y) * (A B X Y)