So I have an exam tomorrow and I encountered this on my questions.
#define mul(x,y) (x * y)
#include <stdio.h>
#include <string.h>
int main()
{
int x = 3;
int y = 4;
int z = 0;
z = mul(x+1, y+1);
printf("4 * 5 = %d \n", z);
return 0;
}
my question is, why is this outputting 8 instead of 20.
Because when I replace z= mul(x+1,y+1)
with z= mul((x+1),(y+1))
I get the correct answer of 20