Computer Sciences > GATE 2021 SET-2 > C
Consider the following ANSI C code segment:
Assume that the variable y points to a struct (allocated on the heap) containing two fields f1 and f2, and the local variables x, y, z, p, q, and i are allotted registers. Common sub-expression elimination (CSE) optimization is applied on the code. The number of addition and dereference operations (of the form y->f1 or y->f2) in the optimized code, respectively, are:
A
403 and 102
B
203 and 2
C
303 and 102
D
303 and 2

Correct : d

Similar Questions

Consider the following ANSI C program: int main() { Integer x; return 0; } Which one of the following phases in a seven-phase C compiler will throw an erro...
#1068 MCQ
Consider the following ANSI C program. What is the output of the above program?
#1075 MCQ
Consider the following ANSI C function: The value returned by SomeFunction(15, 255) is _______.
#1088 Fill in the Blanks

Related Topics

No tags found

Unique Visitor Count

Total Unique Visitors

Loading......