Awesome q2a theme
0 votes

ago in Compiler Design by (143 points) | 25 views

@Chirag Shilwant sorry my bad, i have edited it now.

Thanks for pointing it out.

1 Answer

0 votes
I think answer should be option B.

t1 = a+b

t2 = t1+c

t2 = t1*t2

t2 = t2*t1.

Therefore 2 temporary variables needed.
ago by (55 points) 1 flag:
✌ Edit necessary (Chirag Shilwant)

edited ago by

You have derived the wrong expression

Your 3 address code is generating,

(a+b) *(a+b+c) +(a+b) but the question is (a+b) *(a+b+c) *a+b


So I think A is correct 

T1= a+b

c= T1+c





... can we do 

c = t1 + c;

I don't think so?

Yes we can.. Why not
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
Welcome to GATE CSE Doubts, where you can ask questions and receive answers from other members of the community.
Top Users Jan 2020
  1. shashin

    1163 Points

  2. Vimal Patel

    306 Points

  3. Deepakk Poonia (Dee)

    305 Points

  4. Debapaul

    237 Points

  5. Satbir

    192 Points

  6. SuvasishDutta

    137 Points

  7. Pratyush Priyam Kuan

    118 Points

  8. tp21

    108 Points

  9. DukeThunders

    96 Points

  10. pranay562

    95 Points

Monthly Top User and those within 60% of his/her points will get a share of monthly revenue of GO subject to a minimum payout of Rs. 500. Current monthly budget for Top Users is Rs. 75.
2,989 questions
1,509 answers
89,814 users