MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

COMPILER DESIGN

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Usually the “Three address code” contains address two for the ____ and one for the result.
A
operand
B
operator
C
result
D
statement
Explanation: 

Detailed explanation-1: -The use of names for intermediate values allows three-address code to be easily rearranged which is convenient for optimization. Postfix notation does not have this feature. The reason for the term three-address code is that each statement usually contain three addresses, two for the operands and one for the result.

Detailed explanation-2: -Three address code is a type of intermediate code which is easy to generate and can be easily converted to machine code. It makes use of at most three addresses and one operator to represent an expression and the value computed at each instruction is stored in temporary variable generated by compiler.

Detailed explanation-3: -Three operands are required for each of the three address code instructions.

Detailed explanation-4: -There are three different ways to express three address codes: Quadruple. Triples. Indirect Triples.

Detailed explanation-5: -Three address code of 2D Array in Hindi( C[A[I, J]= B[I, J]+C[A[I, J]+D[I+J])

There is 1 question to complete.