adplus-dvertising
frame-decoration

Question

What is the output of the given statement?
span class="sy0"> * (defun count-atoms (expression);
  (if (atom expression)
  1
  (+ (count-atoms (first expression))
  (count-atoms (rest expression)))))
* (time (count-atoms '((this is))))

a.

4

b.

Depending on your compiler

c.

Error

d.

Both 4 & Depending on your compiler

Answer: (d).Both 4 & Depending on your compiler

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of the given statement?

Similar Questions

Discover Related MCQs

Q. Which procedure is used to create data?

Q. How many values that a symbol may have?

Q. Which enables storage in symbolically indexed places?

Q. What is the collection of property names and values associated with a symbol?

Q. Which is used as writer for properties?

Q. Pick out the correct syntax in given order.

Q. What is a data type in which expressions are stored in places identified by integer indexes?

Q. Which symbol holds the first element and also an index?

Q. Which keyword is used to construct an array?

Q. Which is present in the writer procedure for arrays?

Q. Which keyword embeds the initial element in an array?

Q. Which uses their arguments to build intermediate forms and evaluating them to produce a value?

Q. Which keyword is used to define macro procedures?

Q. Which do not evaluate their arguments?

Q. What is the difference between the appearance of macro and ordinary definition?

Q. Which forms can be constructed with the same primitives that manipulate lisp expressions?

Q. Which exploit the fact that lisp forms are just expressions meant to be evaluated?

Q. Pick out the correct statement about macro.

Q. Which mechanism makes it easy to create and to complete template like expressions?

Q. Which isolates an entire expression from evaluation?