##### What will be output of the given c program?

consider the following program

#define funct(x). x*x+x

int main(){

int x ;

x=36+funct(5)*funct(3);

printf("%d",x);

return 0;

} what would be the output a)73. b)396. c)109 d)360

consider the following program

#define funct(x). x*x+x

int main(){

int x ;

x=36+funct(5)*funct(3);

printf("%d",x);

return 0;

} what would be the output a)73. b)396. c)109 d)360

As the priority of * is higher than + it will be computed first in both funct(x) macro and also while calculating the value of x which means when u call funct(5) the following is returned

funct(5)=(5*5)+5=30

funct(3)=(3*3)+3=12

X=36+(funct(5)*funct(3))

X=36+(30*12)

X=36+360

X=396 is the answer so option b is correct

@sanjayrao answer is 109 ...