solutions
Which of the following statements best describes the difference between
compilers and (software) interpreters? - ANSWER- A compiler translates the high-
level language program into a machine or assembly language program which is
then executed by the hardware interpreter, whereas an interpreter executes the
high-level language program directly.
Which of the following statements best describes the a hybrid compiler? -
ANSWER- A hybrid compiler translates the high-level language program into a
virtual machine program which may then be executed by an interpreter.
Which phase of the compiler has the main task of building the symbol table and
then verifying that identifiers are used according to their representation in the
symbol table? - ANSWER- semantic analysis
Which phase of the compiler is to improve the time and/or space efficiency of the
executable code for the program? - ANSWER- code optimization
The front-end of a compiler consists of: - ANSWER- lexical, syntactic and
semantic analysis and intermediate code generation
The back-end of a compiler consists of: - ANSWER- code optimization and
machine code generation
The purpose of the code generation phase of the compiler is: - ANSWER- to
produce an assembly or machine language translation of the source program
What is the output of the lexical analyzer? - ANSWER- a list of tokens
What is the compilation phase for finding a syntax (or parse) tree for a string of
tokens? - ANSWER- syntax analysis