–1 –1 vote output? Data Structures + – mohitbawankar 703 views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
2 2 votes Given MACRO $ADD(MUL(a,b-1),MUL(a+1,ADD(a,b)))$ It is expanded as $a+b-1*a+1+a*b\\ 4+5-1*4+1+4*5=26$ Hence 26 is the correct answer Ashwani Kumar 2 answered Nov 6, 2017 Ashwani Kumar 2 comment Share Follow See all 2 Comments 2 2 Comments reply mohitbawankar commented Nov 6, 2017 reply Follow flag please explain me a+(b-1) in first multi. and why a*b in last add 0 0 replyShare Ashwani Kumar 2 commented Nov 6, 2017 reply Follow flag Name and operation are swapped here in MUL + is done and in in ADD * is done ADD(a,b) = a*b MUL(a+1,ADD(a,b))= a+1+a*b.....(I) MUL(a,b-1) = a+b-1......(II) Finally ADD of (I) and (II) gives a+b-1*a+1+a*b 0 0 replyShare Please log in or register to add a comment.
0 0 votes I am getting 26 ?? Mohitkumaraiactr answered Nov 6, 2017 Mohitkumaraiactr comment Share Follow 0 reply Please log in or register to add a comment.