MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

COMPILER DESIGN

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
An entry to the symbol table is made in the lexical analysis phase itself.
A
True
B
False
C
Either A or B
D
None of the above
Explanation: 

Detailed explanation-1: -Symbol table is the data structure, which is used in all phase, that is, from lexical analysis till code generation and optimization. Recursion mandatorily requires stack memory during the runtime environment, not heap memory.

Detailed explanation-2: -Symbol table is accessed only during lexical analysis and syntax analysis. II. Compilers for programming languages that support recursion necessarily need heap storage for memory allocation in the run-time environment.

Detailed explanation-3: -It is built-in lexical and syntax analysis phases. The information is collected by the analysis phases of the compiler and is used by the synthesis phases of the compiler to generate code.

Detailed explanation-4: -Lexical analysis is the starting phase of the compiler. It gathers modified source code that is written in the form of sentences from the language preprocessor. The lexical analyzer is responsible for breaking these syntaxes into a series of tokens, by removing whitespace in the source code.

There is 1 question to complete.