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

asked in Compiler Design by Veteran (37.5k points)  
retagged by | 174 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 (77.1k points)  
+1 vote
answered by Veteran (10.9k 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 Sep 2017
  1. Habibkhan

    7142 Points

  2. Warrior

    2640 Points

  3. Arjun

    2480 Points

  4. rishu_darkshadow

    2466 Points

  5. A_i_$_h

    2214 Points

  6. nikunj

    1980 Points

  7. manu00x

    1846 Points

  8. makhdoom ghaya

    1770 Points

  9. Bikram

    1744 Points

  10. SiddharthMahapatra

    1718 Points


26,133 questions
33,705 answers
79,886 comments
31,105 users