1.
Who was the founder of Lisp?
Correct Answer
B. John McCarthy
Explanation
John McCarthy is the correct answer because he is widely recognized as the founder of Lisp, a programming language that was developed in the late 1950s. McCarthy, an American computer scientist, played a crucial role in the development of artificial intelligence and was instrumental in the creation of Lisp, which became one of the most influential programming languages in the field. His contributions to the field of computer science and his work on Lisp have had a lasting impact on the industry.
2.
What does Lisp stand for?
Correct Answer
B. List processing
Explanation
Lisp stands for List processing. Lisp is a programming language that was developed in the late 1950s and is known for its unique data structure called a list. It is designed to manipulate and process lists of data efficiently, making it a powerful tool for tasks such as symbolic processing, artificial intelligence, and language processing. The other options, listening protocol, little performance, and logical process, do not accurately represent the acronym Lisp.
3.
Which extention is used for Lisp files?
Correct Answer
A. .lsp
Explanation
The correct answer is .lsp. This file extension is commonly used for Lisp files.
4.
Which of the following LISP expressions correctly defines a function that takes two arguments, adds them together, and then multiplies the result by 3?
Correct Answer
B. (defun add-and-multiply (x y) (* 3 (+ x y)))
Explanation
Option B correctly uses the LISP syntax to define a function where * is the multiplication operator and + is the addition operator. Option A uses incorrect function names "mult" and "plus" instead of the correct * and +. Option C has incorrect syntax as LISP requires prefix notation (operators before operands). Option D uses incorrect function names "multiply" and "add" instead of the correct * and +.
5.
Strings are characters enclosed in which of these?
Correct Answer
A. “”
Explanation
Strings are characters enclosed in double quotation marks (""). This is the correct answer because in programming languages, strings are typically defined by enclosing a sequence of characters within double quotation marks.
6.
How many types of data variables are there in Common Lisp?
Correct Answer
B. 2
Explanation
Common Lisp has two types of data variables: lexical variables and special variables. Lexical variables are used within a specific scope and are defined using the "let" or "let*" forms. They are typically used for local computations. Special variables, on the other hand, have dynamic extent and can be accessed and modified globally. They are defined using the "defvar" or "defparameter" forms. These variables are commonly used for configuration settings or global state.
7.
Which of these is not a CL symbolic expression?
Correct Answer
C. Value
Explanation
In Common Lisp, a symbolic expression is a data structure that represents code or data. It can be either an atom or a list. An atom is a single entity, such as a number or a symbol. A list is a collection of symbolic expressions enclosed in parentheses. In this case, "Value" is not a CL symbolic expression because it is not defined as an atom or a list in the given options.
8.
What is a sequence?
Correct Answer
C. Vectors and lists
Explanation
A sequence is a collection of elements that are arranged in a specific order. Vectors and lists are both data structures that can be used to represent sequences. Vectors are one-dimensional arrays that can hold elements of the same data type, while lists are a type of container that can hold elements of different data types. Therefore, the correct answer is "Vectors and lists" because both of these data structures can be used to represent a sequence.
9.
All of these arguments are needed for defining functions in Lisp except which parameter of function?
Correct Answer
B. Number
Explanation
In Lisp, all of these arguments, namely Name, Number, Body, and Parameter, are needed for defining functions except for the Number parameter. The Name parameter is used to give a unique identifier to the function, the Body parameter contains the actual code of the function, and the Parameter parameter is used to specify the input variables for the function. However, the Number parameter does not play a role in defining functions in Lisp.
10.
What is Lisp popularly used for?
Correct Answer
A. Artificial Intelligence
Explanation
Lisp is popularly used for Artificial Intelligence because it is a programming language that supports the development of complex algorithms and logic. Lisp's flexibility and powerful features, such as its ability to manipulate symbolic expressions and support for recursion, make it well-suited for tasks related to AI, such as natural language processing, expert systems, and machine learning. Lisp's rich history in AI research and its focus on symbolic processing have contributed to its popularity in this field.