GATE CSE
First time here? Checkout the FAQ!
x
+2 votes
67 views

asked in Compiler Design by Active (1.7k points)   | 67 views

1 Answer

+3 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 (11.1k points)  
selected by
my answer is - 32

Related questions

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


Top Users Sep 2017
  1. Habibkhan

    7838 Points

  2. Warrior

    2812 Points

  3. Arjun

    2696 Points

  4. rishu_darkshadow

    2692 Points

  5. A_i_$_h

    2456 Points

  6. manu00x

    2040 Points

  7. nikunj

    1980 Points

  8. Bikram

    1864 Points

  9. makhdoom ghaya

    1790 Points

  10. SiddharthMahapatra

    1718 Points


26,243 questions
33,815 answers
80,261 comments
31,168 users