Modern Programming Languages MCQs with Answers
Practice important Modern Programming Languages MCQs with answers and explanations.
Multiple Choice Questions
Q331: What type of notation does LISP use?
- A: Infix notation
- B: Prefix notation
- C: Postfix notation
- D: Cambridge notation
View Answer
B
Q332: What is the result of evaluating (+ 1 3 5) in LISP?
- A: 8
- B: 9
- C: 7
- D: Error
View Answer
B
Q333: Fill in the blank: An empty list in LISP is represented by _______.
- A: nil
- B: ()
- C: both A and B
- D: None
View Answer
C
Q334: What function is used to assign values to symbols in LISP?
- A: assign
- B: setq
- C: alloc
- D: map
View Answer
B
Q335: What will (setq x 3.0) return in LISP?
- A: x
- B: 3
- C: Error
- D: NIL
View Answer
B
Q336: In LISP, what happens when quote is used with a symbol?
- A: The symbol is evaluated
- B: The symbol is not evaluated
- C: The symbol is multiplied by 2
- D: The symbol is deleted
View Answer
B
Q337: What will (quote x) return in LISP?
- A: x
- B: Value of x
- C: Error
- D: NIL
View Answer
A
Q338: Evaluate: (+ (/ 3 5) 4)
- A: 23/5
- B: 4.6
- C: Error
- D: 0.6
View Answer
A
Q339: Which of the following is a top-level element in the list (a b (c d))?
- A: a
- B: (c d)
- C: b
- D: All of the above
View Answer
D
Q340: What type of programming paradigm does LISP follow?
- A: Procedural
- B: Functional
- C: Object-Oriented
- D: Declarative
View Answer
B