You can prepare effectively for Computer Science Engineering (CSE) GATE Computer Science Engineering(CSE) 2027 Mock Test Series with this dedicated MCQ Practice Test (available with solutions) on the important topic of "Test: Code Generation & Optimization- 2". These 15 questions have been designed by the experts with the latest curriculum of Computer Science Engineering (CSE) 2026, to help you master the concept.
Test Highlights:
Sign up on EduRev for free to attempt this test and track your preparation progress.
In some phase of compiler
Input
temp1 := Inttoreal (60)
temp2 := id3 * temp1
temp3 := id2 + temp2
id1 := temp3
Output
temp 1 := id3 * 60.0
id1 := id2 + temp1
where temp 1 , temp 2 , temp 3 are temporary storage, id1, id2, Id3 are identifier into real is converting int 60 to real number. The above phase is
Detailed Solution: Question 1
Detailed Solution: Question 2
Detailed Solution: Question 3
Detailed Solution: Question 4
Consider the DAG with V = {1, 2, 3, 4, 5, 6}, shown below

Which of the following is NOT a topological ordering
A directed acyclic graph represents one form of intermediate representation. The number of non terminals nodes in DAG of a = (b + c)*(b + c) expression is
Detailed Solution: Question 6
A pictorial representation of the value computed by each statement in the basic block is
Detailed Solution: Question 7
DAG representation of a basic block allows
Detailed Solution: Question 8
The intermediate code generated for the following syntax tree is:

Detailed Solution: Question 9
The triple representation for following representation is:

Detailed Solution: Question 10
Generation of intermediate code based on an abstract machine model is useful in compilers because
Detailed Solution: Question 11
Three address code’ technique for intermediate code generation shows that each statement usually contains three addresses. Three addresses are as follows:
Detailed Solution: Question 12
Consider the following arithmetic infix expression Q.
A + (B * C - (D / E ^ F) * G) * H
Transform 'Q' into its equivalent postfix expression.
Detailed Solution: Question 13
Which of the following is not a type of three address statements?
Consider the following statements:
S1: Three address code is a linearized representation of a syntax tree.
S2: The syntax tree not depicts the natural hierarchical structure of source program
Which of the above statements is/are true