Explain what is Local Variables?
Answer / chaitanya
With a given procedure local variables are defined. The parameters named as arguments within a function are also referred as local variables. They are accessible only within the respective function.
Is This Answer Correct ? | 0 Yes | 0 No |
What is the output of the following statement? * (setf thing ‘point r 1) * (case thing (circle (*pi r r))(sphere (* 4 pi r r))) a) 1 b) 12.56637 c) NIL d) T
Is it possible to call LISP functions from other languages?
Which is uses their arguments to build intermediate forms and evaluating them to produce a value? a) Backquote b) Macros c) List d) Procedures
Explain what is prolog programming language? What is it based on?
What is the output of the given statement? * (defstruct triangle (base 0) (altitude 0)) * (defun area (figure) (cond ((triangle-p figure) (* 1/2 (triangle-base figure) (triangle-altitude figure))))) * (setf triangle (make-triangle :base 2 :altitude 3)) * (area triangle) a) Triangle b) 7 c) 6 d) 10
What is the output of the given statement in LISP? * (setf abc ‘(a b c) xyz ‘(x y z)) * abc a) A b) B c) ABC
Explain where you use + operator in Prolog?
Which keyword is used to define macro procedures in LISP? a) Defun b) Demacro c) Defmacro d) None of the mentioned
What is the output of the given statement? * (setf day-or-date ‘monday) * (if (symbolp day-or-date) ‘day ‘date) a) Monday b) Day c) Date d) None of the mentioned
Which keyword is used to construct an array in LISP? a) Array b) Make-array c) Bins d) Make
Which is a string of boxes linked by arrow like pointers in LISP? a) Lisp b) List c) Variables d) Pointers
What is the output of the following statement? * (defun make (title author) (list (list ‘title title) (list ‘author author))) * (setf book (make ‘(Common Lisp) ‘(Guy steele))) a) Common Lisp b) Guy steele c) Make d) ((TITLE (COMMON LISP)) (AUTHOR (GUY STEELE)))