Modern Programming Languages MCQs with Answers
Practice important Modern Programming Languages MCQs with answers and explanations.
Multiple Choice Questions
Q351: What is the result of (reverse '(A B C))?
- A: (C B A)
- B: (A C B)
- C: (A B C)
- D: NIL
View Answer
A
Q352: Fill in the blank: In LISP, (union '(A B) '(B C)) returns ____.
- A: (A B)
- B: (A B C)
- C: (B C)
- D: (C A)
View Answer
B
Q353: What will (intersection '(A B) '(B C)) return?
- A: (A)
- B: (A C)
- C: (B)
- D: (A B)
View Answer
C
Q354: Which predicate checks if a value is an atom in LISP?
- A: atom
- B: listp
- C: number
- D: null
View Answer
A
Q355: Fill in the blank: (setq L '(A B C)) makes L equal to _____.
- A: (A B)
- B: (A B C)
- C: NIL
- D: (B C)
View Answer
B
Q356: What is the output of (member 'B '(A B C))?
- A: (B C)
- B: (A B C)
- C: NIL
- D: (A C)
View Answer
A
Q357: What does (set-difference '(A B) '(B C)) return?
- A: (A)
- B: (B)
- C: (A C)
- D: NIL
View Answer
A
Q358: What does (setq L '(A B C)) define?
- A: A variable with the value of a list
- B: A function in LISP
- C: A predicate
- D: A constant
View Answer
A
Q359: What is the result of (listp '(A B C))?
- A: NIL
- B: T
- C: (A B C)
- D: (B C)
View Answer
B
Q360: What does the defun keyword in LISP define?
- A: A variable
- B: A function
- C: A loop
- D: A list
View Answer
B