I am a newbie in C. I am wondering why the following CONST2
is being printed as 13 instead of 18:
#include <stdio.h>
#define CONST 2 + 3 + 4
#define CONST2 CONST * 2
int main()
{
printf("%d %d\n", CONST, CONST2);
return 0;
}
which using gcc compiler prints:
/tmp $ gcc a.c
/tmp $ ./a.out
9 13
Any help is appreciated.