Explain LISP-Vectors?
Answer / chaitanya
Vectors are one-dimensional arrays, therefore, a subtype of array. Vectors and lists together are called sequences. LISP has fixed length variable/ simple vectors as well as variable length vectors which are created with the keywords: adjustable and fill-pointer.
Is This Answer Correct ? | 0 Yes | 0 No |
What is the output of the following statement? * (setf book (book=author-writer book ‘(guy steele))) a) Guy b) Steele c) Error d) None of the mentioned
Which primitive removes all but the last element from the list? a) Last b) First c) Remove d) Revoke
Explain what is recursion in Prolog?
Which is a string of boxes linked by arrow like pointers in LISP? a) Lisp b) List c) Variables d) Pointers
Which makes it easy to identify the first entry encountered that satisfies a given predicate? a) Reusing b) Revoking c) Template d) Filtering
Which makes it possible to define generic functions? a) Lisp b) CLOS c) Class d) Object-Oriented programming
What is the output of the following statement? * (setf whole-list ‘(monday tuesday wednesday thursday friday)) * (defun both-ends ()(setf whole-list (cons (first whole-list) (last whole-list)))) a) Monday b) BOTH-ENDS c) Friday Monday d) Monday Friday
Explain LISP-Vectors?
What does the language of fopl consist of?
How data types are categorized in LISP?
How the clause is called if it contains a test, as well as zero or more additional forms in LISP? a) Conditional b) Consequents c) Clause d) None of the mentioned
. What is the output of the given statement? * (defstruct employee (length-of-service 0) (payment ‘salary)) * (setf employee-example (make-employee)) * (employee-length-of-service employee-example) a) T b) NIL c) 0 d) Error