In LISP, symbol represents a _____
Data type
Data type and data object
Data structure
Any of Data type, data object and data structure
Browse topic-based LISP practice sets.
186 practice sets · Page 2 of 10
In LISP, symbol represents a _____
Data type
Data type and data object
Data structure
Any of Data type, data object and data structure
What is the use of (WRITE 'Argument)?
It converts argument in small letters to capital letters
It returns capital letters from the string
Same as (write 'argument)
It converts the string into alphabetical order/sequence
Is LISP a case sensitive language.
Yes
No
Which of the following can be considered as List?
Number
T
NIL
Empty
What are examples of some of the atoms?
Numeric, Integer, Ratio
Numeric, Lists
Lists
Cons of two atoms
If S1, S2, S3... are S-expressions then list: (S1 S2 S3 ....) is a/an ____
Atom
Error will occur
S-expression
Primitive
Integerp and Zerop will be same __
When argument is not an integer or equal to 0
When argument is not equal to 0
When argument is a negative integer
When argument is a negative integer and not 0
What is the use of zerop?
To check object is zero
To check object is NIL
To make non-zero object to zero
It is same as integerp
Which among these are the data type predicates?
atom
symbolp
listp & numberp
atom, symbol, listp & numberp
Which of the following is used by member primitive to compare arguments?
=
equalp
equal
eql
Setf refers to set field?
Yes
No
In multiple arguments in setf and setq, it prints ____
All the values
Only the first value
Only the last value
Numerically smallest value
How many arguments do setf or setq can have in single braces?
2
4
28
Any even number of arguments.
Choose the correct about Setf and Setq.
Setq can be used in place of setf but not vice versa
Setf can be used in place of setq but not vice versa
Both can be used in place of each other
Neither can be used in place of each other
What is the difference between setf and setq?
Setq is used for symbols only but setf can be used anywhere
No difference is there
Setf is used only for numbers but setq used anywhere
Setf is for lists and setq for numbers
What is the output of (/ 6 3) and (- 6 4)?
2 2
1/2 2
2 -2
1/2 -2
Are arithmetic operators primitives in LISP?
True
False
Which primitive can be used to add an element to List?
delete
cons
cdr
write
Which primitive can be used to remove an element from List?
delete
cons
cdr
write
Which primitive can be used to create a list?
getf
setf
make
none of the mentioned