Generic selectors
Exact matches only
Search in title
Search in content
Search in posts
Search in pages
Filter by Categories
nmims post
Objective Type Set
Online MCQ Assignment
Question Solution
Solved Question
Uncategorized

1. Which can read expressions from data-files one at a time?
a) Print
b) With-open-file
c) Directive
D) None of the mentioned

View Answer

Answer: b [Reason:] With-open-file can read expressions from data files one at a time, as they are needed for processing.

2. Which evaluates the single argument and prints it on a new line?
a) Format
b) With-open-file
c) Print
d) All of the mentioned

View Answer

Answer: c [Reason:] The print primitive evaluates its single argument and prints it on a new line and prints a trailing space character.

3. Which primitive makes the messages consists of uppercase and lowercase letters?
a) Format
b) Directive
c) Print
d) Read

View Answer

Answer: a [Reason:] Format primitive helps to create messages consisting of both uppercase and lowercase letters.

4. Which evaluates the expression twice during execution?
a) Read
b) Eval
c) Format
d) Print

View Answer

Answer: b [Reason:] None.

5. Which makes it possible to print in tabulated columns?
a) Print
b) Read
c) Directive
d) Format

View Answer

Answer: d [Reason:] Format also has the option to print the values in tabulated columns.

6. What is the output of the given statement?

span class="sy0"> * (setf temperature 100)
* (print temperature)

a) 100
b) 200
c) 0
d) 100
100

View Answer

Answer: d [Reason:] This statement will print the print forms and Print’s action. Output: 100 100

7. What is the output of the given statement?

span class="sy0"> * (read)kirsh

a) Kirsh
b) T
c) Nil
d) Error

View Answer

Answer: a [Reason:] This statement will print the given value. Output: KIRSH

8. What is the output of the given statement?

span class="sy0"> * (let ((p nil));
(print '(please type a patient name)) (setf p (read));
(print (append '(ok the name is) (list p)))p);

a) Nil
b) T
c) Error
d) The value you entered

View Answer

Answer: d [Reason:] Thish statement will get the value from the terminal and print it. Output: dfa (PLEASE TYPE A PATIENT NAME) (OK THE NAME IS DFA) DFA

9. What is the output of the given statement?

span class="sy0"> * (format t "Hello!")Hello!

a) Hello
b) T
c) Nil
d) None of the mentioned

View Answer

Answer: c [Reason:] This statement will compare the value and print the result. Output: Hello! NIL

10. What is the output of the given statement?

span class="sy0"> * (setf name 'kirsh symptoms '(fever rash))
* (print (list 'patient name 'presented (length symptoms) 'symptoms symptoms))

a) Patient
b) Krish
c) 2
d) (PATIENT KIRSH PRESENTED 2 SYMPTOMS (FEVER RASH))

View Answer

Answer: d [Reason:] This statement will count the number of symptoms in the given name and print the result. Output: (PATIENT KIRSH PRESENTED 2 SYMPTOMS (FEVER RASH)) (PATIENT KIRSH PRESENTED 2 SYMPTOMS (FEVER RASH))