GATE CSE
Compiler Design
Code Generation and Optimization
Previous Years Questions

Marks 1

Consider the following statements. I. Symbol table is accessed only during lexical analysis and syntax analysis. II. Compilers for programming languag...
Which one of the following is FALSE?
Which languages necessarily need heap allocation in the runtime environment?
Some code optimizations are carried out on the intermediate code because
Consider the grammar rule $$E \to {E_1} - {E_2}$$ for arithmetic expressions. The code generated is targeted to a CPU having a single user register. T...
Match the followings: Group-I (a) Pointer data type (b) Activation Record (c) Repeat -Until (d) Coercion Group-II (p) Type Conversion (q) Dyn...

Marks 2

A variable x is said to be live at a statement $${S_i}$$ in a programif the following three conditions hold simultaneously: i. There exists a statemen...
The least number of temporary variables required to create a three-address code in static single assignment form for the expression $$q + r / 3 + s -...
Consider the intermediate code given below. (1) i = 1 (2) j = 1 (3) t1 = 5 ∗ i (4) t2 = t1 + j (5) t3 = 4 ∗ t2 (6) t4 = t3 (7) a[t4] = -1 (8) ...
For a C program accessing X[ i ] [ j ] [ k ], the following intermediate code is generated by a compiler. Assume that the size of an integer is 32 bit...
Consider the following translation scheme. $$\eqalign{ & S \to ER \cr & R \to *E\left\{ {pr{\mathop{\rm int}} ('*');} \right\}R\,|\,\var...
Consider the following C code segment. for (i = 0; i < n; i++) { for (j=0; j < n; j++) { if (i%2) { ...
Consider line number 3 of the following C - program. int main ( ) { /* Line 1 */ int I, N; /* Line 2 */ fro (I = 0, I...
Consider the syntax directed definition shown below. Here, gen is a function that generates the output code, and newtemp is a function that returns t...
Which of the following is NOT an advantage of using shared, dynamically linked libraries as opposed to using statically linked libraries?
EXAM MAP
Joint Entrance Examination
JEE MainJEE AdvancedWB JEEBITSATMHT CET
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN