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

asked in Compiler Design by Veteran (36.7k points)   | 148 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.3k points)  
+1 vote
answered by Veteran (10.6k 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 May 2017
  1. akash.dinkar12

    3338 Points

  2. pawan kumarln

    2066 Points

  3. Bikram

    1922 Points

  4. sh!va

    1672 Points

  5. Arjun

    1614 Points

  6. Devshree Dubey

    1272 Points

  7. Debashish Deka

    1174 Points

  8. Angkit

    1056 Points

  9. LeenSharma

    1018 Points

  10. Arunav Khare

    758 Points

Monthly Topper: Rs. 500 gift card
Top Users 2017 May 22 - 28
  1. Bikram

    1008 Points

  2. pawan kumarln

    692 Points

  3. Arnab Bhadra

    632 Points

  4. Arjun

    342 Points

  5. bharti

    328 Points


22,888 questions
29,193 answers
65,292 comments
27,691 users