Compiler Design
Lexical Analysis
Marks 1Marks 2
Syntax Directed Translation
Marks 1Marks 2
Code Generation and Optimization
Marks 1Marks 2
1
GATE CSE 2008
MCQ (Single Correct Answer)
+1
-0.3
Some code optimizations are carried out on the intermediate code because
A
They enhance the portability of the compiler to other target processors
B
Program analysis is more accurate on intermediate code than on machine code
C
The information from dataflow analysis cannot otherwise be used for optimization
D
The information from the front end cannot otherwise be used for optimization
2
GATE CSE 2004
MCQ (Single Correct Answer)
+1
-0.3
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. The subtraction operation requires the first operand to be in the register. If E1 and E2 do not have any common sub-expression, in order to get the shortest possible code.
A
E1 should be evaluated first
B
E2 should be evaluated first
C
Evaluation of E1 and E2 should necessarily be interleaved
D
Order to evaluation of E1 and E2 is of no consequence
3
GATE CSE 1990
MCQ (Single Correct Answer)
+1
-0.3

Match the followings:

Group-I

(a) Pointer data type
(b) Activation Record
(c) Repeat -Until
(d) Coercion

Group-II

(p) Type Conversion
(q) Dynamic Data Structure
(r) Recursion
(s) Nondeterministic loop
A
a - p, b - r, c - s, d - q
B
a - q, b - r, c - s, d - p
C
a - q, b - s, c - r, d - p
D
a - r, b - q, c - s, d - p
GATE CSE Subjects
Theory of Computation
Operating Systems
Algorithms
Digital Logic
Database Management System
Data Structures
Computer Networks
Software Engineering
Compiler Design
Web Technologies
General Aptitude
Discrete Mathematics
Programming Languages
Computer Organization