GATE CSE
First time here? Checkout the FAQ!
x
0 votes
154 views

asked in Compiler Design by Veteran (37k points)  
retagged by | 154 views

2 Answers

+3 votes

Triples and quadruples are actually representations of intermediate code ..

Triple is defined as :

Each instruction in triples presentation has three fields : op, arg1, and arg2.The results of respective sub-expressions are denoted by the position of expression. 

So the disadvantage which is evident is we can change the position of statements and hence inefficient from code optimisation point of view..

 

But the advantage is less space is required as compared to quadruple notation..

Hence C) should be correct answer.. 

answered by Veteran (66.6k points)  
+1 vote
answered by Veteran (10.7k points)  
edited by

saurab its asking advantage...we cant move statements in triples..only less space is wasted there..c is right

In a triple representation, if we want to move a statement then  we must change all of the pointers.So this will not be advantage.
@Sudho yes C should be correct .But Ans given is B.
srry i m also thinking that C is correct bt wrongly i mark as a now corrected
thnx....


Top Users Jul 2017
  1. Bikram

    3782 Points

  2. manu00x

    2464 Points

  3. Debashish Deka

    1832 Points

  4. joshi_nitish

    1494 Points

  5. Arnab Bhadra

    1096 Points

  6. Arjun

    1054 Points

  7. Hemant Parihar

    1050 Points

  8. Shubhanshu

    972 Points

  9. Ahwan

    876 Points

  10. akash.dinkar12

    642 Points


23,953 questions
30,895 answers
70,108 comments
29,273 users