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

asked in Compiler Design by Active (1.6k points)   | 45 views

1 Answer

+2 votes
Best answer

from the given SDT we conclude some rules

i)' *'  is least priority and left associative.

ii)'-' is 2nd highest priority and left associative

iii) '/' is highest priority and right associative.

1)    8/4*2-6*4

=2*2-6*4 (8/4=2)

=2*-4*4 (2-6=-4)

=-2*4 (2*-4=-2  addition property for *)

a1=2

2) 6*2/1-2*3

=6*2-2*3

=6*0*3

=6*3

a2=9.

so a1-a2=2-9=-7

answered by Veteran (10.6k points)  
selected by

Related questions

+2 votes
2 answers
1
asked in Compiler Design by Rakesh K Active (1.6k points)   | 173 views
+2 votes
1 answer
2
+1 vote
1 answer
3
Top Users Feb 2017
  1. Arjun

    5288 Points

  2. Bikram

    4230 Points

  3. Habibkhan

    3952 Points

  4. Aboveallplayer

    3086 Points

  5. Debashish Deka

    2378 Points

  6. sriv_shubham

    2308 Points

  7. Smriti012

    2236 Points

  8. Arnabi

    2008 Points

  9. mcjoshi

    1690 Points

  10. sh!va

    1684 Points

Monthly Topper: Rs. 500 gift card

20,860 questions
26,010 answers
59,673 comments
22,113 users