415 views
0 votes
0 votes

What is the output of the following program?

1 Answer

Best answer
2 votes
2 votes
Macros in C simply replace the macro-call by the macro definition.

$MUL(MUL(a+1, b), POW(b+1))$
$MUL(a+1 * b, POW(b+1))$
$MUL(a+1 * b, b+1 * b+1)$
$a+1 * b * b+1 * b+1$
$a+b*b+b+1$
$a+b^2+b+1$
Put $a = 3$ and $b = 2$,
$3+4+2+1$
$= 10$
selected by

Related questions

0 votes
0 votes
3 answers
1
0 votes
0 votes
1 answer
2
3 votes
3 votes
5 answers
3
srestha asked May 22, 2019
1,842 views
Consider the following function height, to which pointer to the root node of a binary tree shown below is passedNote that max(a,b) defined by #define max(a,b) (a>b)?a:b.i...