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

asked in Compiler Design by Veteran (36k points)   | 133 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 (65k points)  
+1 vote
answered by Veteran (10.3k 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 Feb 2017
  1. Arjun

    5396 Points

  2. Bikram

    4230 Points

  3. Habibkhan

    3952 Points

  4. Aboveallplayer

    3086 Points

  5. Debashish Deka

    2564 Points

  6. sriv_shubham

    2318 Points

  7. Smriti012

    2240 Points

  8. Arnabi

    2008 Points

  9. mcjoshi

    1696 Points

  10. sh!va

    1684 Points

Monthly Topper: Rs. 500 gift card

20,863 questions
26,023 answers
59,698 comments
22,136 users