LISP Multiple Choice Questions on “File Manipulation”.
1. Which translate the procedures into equivalent computer instructions?
a) File
b) Compile-file
c) Compiler
d) None of the mentioned
Answer: b
Clarification: Compile-file is mainly used to translate the procedures into equivalent computer instructions.
2. Which primitive is used to create or modify a specified file?
a) File
b) Manipulation
c) ED
d) None of the mentioned
Answer: c
Clarification: To create or modify a file, we can use ED primitive.
3. How the files are specified in lisp?
a) Strings
b) Characters
c) Booleans
d) None of the mentioned
Answer: a
Clarification: Files are specified as strings, which is one lisp’s data type.
4. Which has its own convention for doing the basic maneuvers?
a) Lisp
b) Compiler
c) Lisp
d) Editor
Answer: d
Clarification: Editors have their own convention for doing basic maneuvers.
5. To which value does the lisp compiler is evaluated?
a) File
b) String
c) Compile-File
d) None of the mentioned
Answer: c
Clarification: Lisp compiler is used to evaluate a compile-file form.
6. What is produced from compile-file?
a) Text file
b) Binary file
c) Lsp file
d) All of the mentioned
Answer: b
Clarification: Compile-file produces a binary file full of unintelligible computer instructions expressed by a bit sequences.
7. What is the correct syntax form of the given statement?
a) (ed )
b) (ef )
c) (ed )
d) All of the mentioned
Answer: a
Clarification: Thus the syntax of ED primitive is given.
8. What is the correct syntax form of the given statement?
a) (load )
b) (load )
c) (load)
d) None of the mentioned
Answer: b
Clarification: Load primitive is used to read from files.
9. What is the correct syntax form of the given statement?
a) (compile-file )
b) (compile )
c) (compile-file )
d) None of the mentioned
Answer: c
Clarification: In Syntax; source file specification comes instead of target-file. So, compile-file is the correct syntax.
10. Which is used to compile indivual procedures?
a) Compile-file
b) ED
c) Compile
d) Load
Answer: c
Clarification: Lisp proves a way to compile indivual procedures by the use of compile.
