LATEST UPDATE (ALREADY GRADED A+)
Optimization of a program that works within a single basic block of code is called _________________
a. local transformation / optimization
b. global transformation / optimization
c. loop un-controlling
d. loop controlling
a. local transformation / optimization
Any macros specified in source code are expanded by the _____________
a. preprocessor
b. assembler
c. compiler
d. linker
a. preprocessor
Macro without arguments is treated like a _____________ _______________
symbolic constant
A macro with arguments has its arguments substituted for replacement text, when the macro is
_________________
expanded
What is the role of optimizing the compiler?
a. To take less time for execution
b. To occupy less space (memory)
c. To optimize the code
d. All of the above
d. All of the above
What does the lexical analyzer take as input?
a. Tokens
b. Source code
c. Machine code
d. Both B and C
, b. Source code
What is the process of searching for match tokens described using?
a. Context-free grammar
b. Finite automata
c. Regular expressions
d. Both B and C
d. Both B and C
These operations are performed in parsing phase of compilation.
a. Obtaining tokens from lexical analysis
b. Group tokens into statements
c. Construct parse trees
d. All the above
d. All the above
The primary job of the linker is to _______________
a. combine functions, libraries, etc., into an executable program
b. translate source code into object code
c. find syntax errors in a program
d. find semantic errors in a program
e. convert input characters into the proper data types for the variables used for input
a. combine functions, libraries, etc., into an executable program
In a C program, the statement int x = 10.5; should be detected as___________
a. Valid assignment statement
b. Syntax error
c. Semantic error
d. Lexical error
c. Semantic error
Compilation translates high-level ______________ ________ into ____________ _______
source language; machine language
4 phases of the compilation process
lexical analysis
syntax analysis
semantics analysis
code generation