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 given statement? * (defstruct person (sex nil) (personality ‘nice)) * (setf person-instance-1 (make-person)) * (setf person-instance-2 (make-person :sex ‘female)) * (setf (person-surname person-instance-1) ‘winston) a) Winston b) Nil c) T d) Error
What is the output of the given statement? * (setf toss ‘(heads tails tails tails heads tails)) * (delete ‘heads toss) * toss a) Heads tails b) Heads tails tails tails tails c) Heads d) None of the mentioned
Which is present in the writer procedure for arrays in LISP? a) Setf b) Aref c) Fref d) Both a & b
What will happen if the value of all the test-forms are nil? a) Nothing b) COND form is nil c) Both a & b d) None of the mentioned
Explain where you use + operator in Prolog?
What are the variables that are bound and that have values assigned to them? a) Data b) Variable c) Parameters d) None of the mentioned
What is the output of the following statement in LISP? * (setf thing ‘point r 1) * (case thing (circle (*pi r r))(sphere (* 4 pi r r)) (otherwise 0)) a) 1 b) 0 c) 12.566 d) None of the mentioned
Explain what is backtracking in Prolog?
Which forms can be constructed with the same primitives that manipulate lisp expressions? a) Lisp b) Macro c) Procedure d) Defun
What is the output of the given statement? * (setf pressure 3) * (when-plusp pressure (print ‘alarm)); a) Alarm b) Alarm Alarm c) 1 d) Nil
Explain what is setq is used for in LISP?
Which symbol holds the first element and also an index in LISP? a) Nail b) Tail c) Initial d) All of the mentioned
AI Algorithms (74)
AI Natural Language Processing (96)
AI Knowledge Representation Reasoning (12)
AI Robotics (183)
AI Computer Vision (13)
AI Neural Networks (66)
AI Fuzzy Logic (31)
AI Games (8)
AI Languages (141)
AI Tools (11)
AI Machine Learning (659)
Data Science (671)
Data Mining (120)
AI Deep Learning (111)
Generative AI (153)
AI Frameworks Libraries (197)
AI Ethics Safety (100)
AI Applications (427)
AI General (197)
AI AllOther (6)