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 is used to create the data for constructor?
a) List
b) Variable
c) Procedure
d) None of the mentioned

View Answer

Answer: c [Reason:] A procedure that creates data is a constructor.

2. How many values that a symbol may have?
a) 1
b) 2
c) 3
d) 4

View Answer

Answer: b [Reason:] Symbols may have property values as well as ordinary values.

3. Which enables storage in symbolically indexed places?
a) Properties
b) Procedures
c) Variable
d) List

View Answer

Answer: a [Reason:] Properties enables storage in symbolically indexed places.

4. What is the collection of property names and values associated with a symbol?
a) List
b) Property
c) Procedures
d) Property list

View Answer

Answer: d [Reason:] The collection of property names and values associated with a symbol is said to be property value.

5. Which is used as writer for properties?
a) Setf
b) Get
c) Both Setf & Get
d) None of the mentioned

View Answer

Answer: c [Reason:] The setf will be used together with get, is the writer for properties.

6. What is the output of the given statement?

span class="sy0"> * (setf (get 'patrick 'parents) '(robert dorothy))

a) Robert
b) Dorothy
c) Error
d) Robert Dorothy

View Answer

Answer: d [Reason:] This statement is used to reterieve the contents from a property. Output: (ROBERT DOROTHY)

7. What is the output of the given statement?

span class="sy0"> * (setf (get 'bag 'contents) '(bread butter))
* (get 'bag 'contents)

a) Bread butter
b) Bread
c) Butter
d) None of the mentioned

View Answer

Answer: a [Reason:] This statement contains get which is used to reterieve the data. Output: (BREAD BUTTER)

8. What is the output of the given statement?

span class="sy0"> * (setf (get 'bag 'contents) '(bread butter))
* (get 'bag 'contents)
* (remprop 'bag 'contents)

a) Bread
b) Butter
c) (CONTENTS (BREAD BUTTER))
d) None of the mentioned

View Answer

Answer: c [Reason:] This statement is used to remove the contents from the bag property. Output: (CONTENTS (BREAD BUTTER))

9. What is the output of the given statement?

span class="sy0"> * (setf (get 'bag 'contents) '(bread butter))
* (remprop 'bag 'contents)
* (get 'bag 'contents)

a) T
b) Nil
c) Bread Butter
d) None of the mentioned

View Answer

Answer: b [Reason:] This statement will get the content after removing the data, So it is printing as Nil. Output: NIL

10. Pick out the correct syntax in given order.
a) (setf (get <symbol> <property name>) <property value>)
b) (setf (get <property name>)
c) (setf <property value> (get <symbol> <property name>)
d) None of the mentioned

View Answer

Answer: a [Reason:] The setf and get are used as writer for properties.

.woocommerce-message { background-color: #98C391 !important; }