L Linh Chi New member Sep 21, 2021 #1 What is the output of the following LISP program? (NOTE: * means new line) Code: (defun b(p) (+ p p) ) * (setq z 1) * (b z) A. 2 B. 1 C. 3 D. error
What is the output of the following LISP program? (NOTE: * means new line) Code: (defun b(p) (+ p p) ) * (setq z 1) * (b z) A. 2 B. 1 C. 3 D. error
Q Quốc Đặng Member Sep 21, 2021 #2 Answer: a Explanation: The parameter z=1 is passed to the function named b and then within the function the p+p=2 is done. Thus, function will return 2 as an output of this program. Output: 2 Upvote 0 Downvote
Answer: a Explanation: The parameter z=1 is passed to the function named b and then within the function the p+p=2 is done. Thus, function will return 2 as an output of this program. Output: 2