5 5 votes The expression $1 * 2 \wedge 3 * 4 \wedge 5 * 6$ will be evaluated as $32^{30}$ $162^{30}$ 49152 173458 In original quetion 5 is not given. Compiler Design isro2009 compiler-design expression-evaluation + – Desert_Warrior 5.2k views answer comment Share Follow Print See 1 comment 1 1 comment reply Anjali_aspirant commented Jun 20, 2016 reply Follow flag Ans is (c)? 0 0 replyShare Please log in or register to add a comment.
Best answer 5 5 votes power has a higher priority than the multiplication 1*2^3*4^5*6 = 1 * (2^3) * (4^5 ) * 6 =1 * 8 * 1024 * 6 =49152 Pranabesh Ghosh 1 answered Jun 3, 2016 • selected Jun 3, 2016 by Desert_Warrior Pranabesh Ghosh 1 comment Share Follow See all 2 Comments 2 2 Comments reply pavansan commented Jan 3 reply Follow flag exponent is right associative right then why 2^3 and not 3^2? 0 0 replyShare Aritra_Dam commented Feb 6 reply Follow flag You calculate 2^3 (2 to the power of 3) simply because 2 is on the left and 3 is on the right. Associativity doesn't swap them to make it 3^2. It would only matter if the problem was written as 2 ^ 3 ^ 2. Here we do 2^(3^2) that means right sign of the chain is evaluated first. 0 0 replyShare Please log in or register to add a comment.
2 2 votes Answer C) First solve ^ and then * Kapil answered Jun 20, 2016 Kapil comment Share Follow See 1 comment 1 1 comment reply tryhard commented May 10, 2017 reply Follow flag how do we know in exam wheather ^ is bitwise or not plz dont say check the option by taking ^ bitwise bcz in exam it some more hectic 0 0 replyShare Please log in or register to add a comment.
0 0 votes first we have to solve higher precedence first ^then * 1*2^3*4^5*6 1*(2^3)*(4^5)*6= 1*8*1024*6=49152 kvkumar answered Jun 25, 2016 kvkumar comment Share Follow 0 reply Please log in or register to add a comment.