Explore topic-wise MCQs in Lisp.

This section includes 11 Mcqs, each offering curated multiple-choice questions to sharpen your Lisp knowledge and support exam preparation. Choose a topic below to get started.

1.

What will be the value of p after this program?

A. 2
B. 3
C. 4
D. ErrorView Answer
Answer» D. ErrorView Answer
2.

What will be the value of pow(x,y) after this LISP statement?

A. 20
B. 1024
C. 625
D. 645View Answer
Answer» D. 645View Answer
3.

What is the value of (cdr ‘(a b c d)) after following LISP statements?

A. 2
B. B C D
C. A
D. ) after following LISP statements? a) 2b) B C Dc) Ad) A 2View Answer
Answer» C. A
4.

What will be the output after the execution of the following LISP statement?

A. Error
B. 2
C. A
D. A BView Answer
Answer» C. A
5.

What will the output after the execution of following LISP statement?

A. 2
B. Error
C. X
D. 2XView Answer
Answer» C. X
6.

ERROR?$

A. 2
B. A
C. A B
Answer» D.
7.

Setf refers to set field?

A. Yes
B. No
Answer» B. No
8.

In multiple arguments in setf and setq, it prints ____

A. All the values
B. Only the first value
C. Only the last value
D. Numerically smallest value
Answer» D. Numerically smallest value
9.

How many arguments do setf or setq can have in single braces?

A. 2
B. 4
C. 28
D. Any even number of arguments.
Answer» E.
10.

Choose the correct about Setf and Setq.

A. Setq can be used in place of setf but not vice versa
B. Setf can be used in place of setq but not vice versa
C. Both can be used in place of each other
D. Neither can be used in place of each other
Answer» C. Both can be used in place of each other
11.

What is the difference between setf and setq?

A. Setq is used for symbols only but setf can be used anywhere
B. No difference is there
C. Setf is used only for numbers but setq used anywhere
D. Setf is for lists and setq for numbers
Answer» B. No difference is there