Skip to main content

Modern Programming Languages MCQs with Answers

Practice important Modern Programming Languages MCQs with answers and explanations.

Multiple Choice Questions

Q381: What is returned by dotimes when the optional result parameter is not provided?
  • A: The count variable
  • B: NIL
  • C: The last element of the loop
  • D: An error
View Answer
B

Q382: What does the function product-as-sum compute in LISP?
  • A: Multiplication using repeated addition
  • B: Division using loops
  • C: List concatenation
  • D: Sum of array elements
View Answer
A

Q383: What is the primary purpose of a property list in LISP?
  • A: To store variables
  • B: To assign and access properties
  • C: To create a symbol table
  • D: To define a new loop construct
View Answer
B

Q384: Which function in LISP removes a property from a property list?
  • A: remprop
  • B: setf
  • C: symbol-plist
  • D: delprop
View Answer
A

Q385: What data structure does LISP primarily use?
  • A: Arrays
  • B: Lists
  • C: Trees
  • D: Hash tables
View Answer
B

Q386: How are two-dimensional arrays created in LISP?
  • A: Using make-array function
  • B: Using array keyword
  • C: By defining nested lists
  • D: By using setf
View Answer
A

Q387: What is the output of (aref chess-board 7 4) after storing 'BLACK-KING' at that position?
  • A: WHITE-BISHOP
  • B: BLACK-KING
  • C: NIL
  • D: Error
View Answer
B

Q388: Which of the following is a unique feature of LISP?
  • A: Supports read-time, compile-time, and runtime
  • B: Allows only static typing
  • C: Uses arrays as the primary structure
  • D: No support for garbage collection
View Answer
A

Q389: Fill in the blank: In LISP, symbols act as ________.
  • A: pointers to strings stored in a hash table
  • B: static variables
  • C: temporary variables
  • D: error handlers
View Answer
A

Q390: What does the get function in LISP retrieve?
  • A: The value of a variable
  • B: The value of a property
  • C: The index of an array
  • D: The name of a list
View Answer
B

Test Your Knowledge

Take a timed quiz on Modern Programming Languages

🚀 Start Quiz Now