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

asked in Compiler Design by Active (1.5k points)   | 43 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.2k points)  
selected by

Related questions

+2 votes
2 answers
1
asked in Compiler Design by Rakesh K Active (1.5k points)   | 151 views
+2 votes
1 answer
2
+1 vote
1 answer
3
Top Users Jan 2017
  1. Debashish Deka

    9660 Points

  2. sudsho

    5554 Points

  3. Bikram

    5280 Points

  4. Habibkhan

    4878 Points

  5. Vijay Thakur

    4498 Points

  6. Arjun

    4418 Points

  7. saurabh rai

    4236 Points

  8. Sushant Gokhale

    4140 Points

  9. Kapil

    3848 Points

  10. santhoshdevulapally

    3808 Points

Monthly Topper: Rs. 500 gift card

19,443 questions
24,221 answers
53,871 comments
20,372 users