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? * (first ‘( p h w)) a) P b) H c) W d) phw
What is a symbol thought of as a name for a place to store value? a) Data b) Variable c) Parameters d) None of the mentioned
What is partly embedded in the knowledge of your programming for manipulating applications? a) Programming cliches b) Procedures c) Abstraction d) Data
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
Which require sophisticated precedence compputation? a) Superclass b) Multiple Superclass c) Subclass d) None of the mentioned
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 given statement? * (defclass article() ((title :accessor article-title :initarg :title) (author :accessor article-author :initarg :author))) * (defclass computer-article (article) ()) * (defclass business-article (article) ()) * (defclass political-article (article) ()) * (setf articles (list (make-instance ‘business-article :title “Memory Prices down”))) a) Business article b) Political article c) Business article
Why in prolog it is said that Program and Data are the same thing?
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
Which notation facilitates uniformity in lisp? a) Prefix b) Postfix c) Infix d) None of the mentioned
What is the output of the given statement in LISP? * (setf l1 (list ‘a ‘b ‘c)) * (setf l2 (list ‘a ‘b)) * (setf l1 l2) a) A B b) A B C c) B C d) None of the mentioned
What is the output of the given statement in LISP? * (setf fact1 ‘(big computers are nice)) * (setf (first fact1) ‘fast) a) Big computers b) Fast c) Big computers are fast d) None of the mentioned