in Compiler Design retagged by
485 views
1 vote
1 vote

in Compiler Design retagged by
by
485 views

4 Comments

72??
0
0
reshown by
$(((2 \uparrow 3 )\uparrow (2 +1)) * 2) * (3 + 2)$

Solving this we get = $5120$
0
0
Precedence given $ + >  \uparrow  > * $
0
0
yes,5120 is correct.
0
0

2 Answers

0 votes
0 votes

S1. 2↑3↑(2+1=3)∗2∗  (3+2=5)  (+ having high precednce)

S2.  (2↑3=8)↑3*2*5                 (↑ more precedence than * and also left associative(first evalute leftmost)

S3.  (8↑3=512)*2*5      

S4.  512*2*5=5120

0 votes
0 votes
Given that: $2\uparrow 3\uparrow 2+1*2*(3+2)$

$\implies 2\uparrow 3\uparrow (2+1)*2*5$

$\implies (2\uparrow 3)\uparrow 3*2*5$

$\implies (8\uparrow3)*2*5$

$\implies (512*2)*5$

$\implies (1024*5)=5120$