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

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

Related questions

+2 votes
2 answers
1
asked in Compiler Design by Rakesh K Active (1.6k points)   | 185 views
+2 votes
1 answer
2
+1 vote
1 answer
3


Top Users Apr 2017
  1. akash.dinkar12

    3366 Points

  2. Divya Bharti

    2536 Points

  3. Deepthi_ts

    2040 Points

  4. rude

    1966 Points

  5. Tesla!

    1768 Points

  6. Shubham Sharma 2

    1610 Points

  7. Debashish Deka

    1584 Points

  8. Prashant.

    1462 Points

  9. Arunav Khare

    1444 Points

  10. Kapil

    1414 Points

Monthly Topper: Rs. 500 gift card

22,072 questions
28,030 answers
63,191 comments
24,128 users