MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

COMPILER DESIGN

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
In three-address code, arrays are
A
Not supported
B
One dimensional
C
More than one dimensional
D
Supported via pointers
Explanation: 

Detailed explanation-1: -The construction of a three address code for arrays involves recalculation of index of the array. Arrays of all dimensions have to be reduced to one dimension. So, we begin with one dimensional arrays.

Detailed explanation-2: -Three Address Code is a form of an intermediate code. They are generated by the compiler for implementing Code Optimization. They use maximum three addresses to represent any statement. They are implemented as a record with the address fields.

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

Detailed explanation-4: -In computer science, three-address code (often abbreviated to TAC or 3AC) is an intermediate code used by optimizing compilers to aid in the implementation of code-improving transformations. Each TAC instruction has at most three operands and is typically a combination of assignment and a binary operator.

Detailed explanation-5: -The three address code can be represented in two forms: quadruples and triples.

There is 1 question to complete.