Explain what is the importance of the hash table in LISP?
Answer / chaitanya
The hash table data structure denotes a collection of key and value pairs which are arranged based on the hash code of the key. Each item in the hash table has key/value pair and is used to access the items in the collection. When you want to access elements by using a key a hash table is used.
Is This Answer Correct ? | 0 Yes | 0 No |
Demonstrate with an example how you can code in LISP?
Which is present in the writer procedure for arrays in LISP? a) Setf b) Aref c) Fref d) Both a & b
Which keyword is used to construct an array in LISP? a) Array b) Make-array c) Bins d) Make
Which symbol holds the first element and also an index in LISP? a) Nail b) Tail c) Initial d) All of the mentioned
Which keyword embeds the initial element in an array in LISP? a) Initial b) Initial-content c) Initial-element d) None of the mentioned
Which checks the evaluated key form against the unevaluated keys using EQL? a) COND b) CASE c) NIL d) SETF
What is the process of reserving a place in computer memory to store a value for a symbol? a) Storing b) Ranging c) Binding d) None of the mentioned
Mention what is Cut (!) in Prolog and what is the advantage of ‘Cut’ and ‘Negation’?
What is the output of the given statement in LISP? * (Setf part-bins (make-array ‘(4))) a) #Done b) #4 c) #(0 0 0 0) d) None of the mentioned
Which primitive removes all but the last element from the list? a) Last b) First c) Remove d) Revoke
What is the output of the following statement? * (defun both-ends-with-special ()(setf whole-list (cons (first whole-list) (last whole-list)))) * (setf whole-list ‘(monday tuesday wednesday thursday friday)) * (both-ends-with-special) a) Monday b) Friday c) Wednesday d) Both a & b
Mention who is referred as a Member in Prolog?