Banashree Patra
Banashree Patra
Branch Unspecified
06 May 2012

find the output of this code

#include<stdio.h>
#define MUL(a,b) a*b
#define Pow(a) a*a
int main()
{
int a=3;
int b=2;
printf("Ans: %d\n", MUL (MUL(a+1,b), Pow(b+1)));
return 0;
}
jigneshdgreat

jigneshdgreat

Branch Unspecified
6 years ago
Ans: 10
it gets evaluated as :a+1*b*b+1*b+1
deepu11111111

deepu11111111

Branch Unspecified
6 years ago
Yes 10
6 years ago
Ans: 10!

Share this content on your social channels -

Only logged in users can reply.