Invitation to Computer Science 7th Edition By G Michael Schneider Judith Gersting -Test Bank
1. High-level languages must be translated into hybrid language before they can be executed. _________________________
ANSWER: False – machine
POINTS: 1
REFERENCES: 540
2. Parsing is the first phase of the compilation process. _________________________
ANSWER: False – Lexical analysis
POINTS: 1
REFERENCES: 544
3. In BNF, the syntax of a language is specified as a series of grammars. _________________________
ANSWER: False – rules
POINTS: 1
REFERENCES: 551
4. Building two parse trees implies that the parser has demonstrated correctness in two different ways. _________________________
ANSWER: True
POINTS: 1
REFERENCES: 563
5. The English-language sentence, “The orange artichoke flew through the pink eight-legged elephant” is semantically meaningful. _________________________
ANSWER: False – meaningless
POINTS: 1
REFERENCES: 567
6. The output of a(n) ____________________ is a list of all the tokens contained in a high-level language statement, as well as the classification number of each token found.
ANSWER: scanner
POINTS: 1
REFERENCES: 546
7. The output of a parser is a(n) complete ____________________, or an error message if one cannot be constructed.
ANSWER: parse tree
POINTS: 1
REFERENCES: 550
8. If a parser can convert the sequence of input tokens into the goal symbol, then that sequence of tokens is a syntactically ____________________ statement of the language.
ANSWER: valid
POINTS: 1
REFERENCES: 554-555
9. ____________________ for high-level languages like C++ or Java are very large.
ANSWER: Grammars
POINTS: 1
REFERENCES: 556
10. One of the possible local ____________________ is eliminating unnecessary operations.
ANSWER: optimizations
POINTS: 1
REFERENCES: 578
11. A high-level language statement is translated into a single machine language instruction.
a. True
b. False
ANSWER: False
POINTS: 1
REFERENCES: 541
12. The singular goal of compilers is correctness.
a. True
b. False
ANSWER: False
POINTS: 1
REFERENCES: 542
13. The code a compiler produces should be reasonably efficient and concise.
a. True
b. False
ANSWER: True
POINTS: 1
REFERENCES: 542
14. The input to a scanner is the machine language statement from the source program.
a. True
b. False
ANSWER: False
POINTS: 1
REFERENCES: 546
15. A BNF rule is also known as a production.
a. True
b. False
ANSWER: True
POINTS: 1
REFERENCES: 551
Reviews
There are no reviews yet.