Suppose we have this expression:
#define cube(x) x * x * x
And then we call it:
int n = 3, v;
v = cube(n + 1); // v = 10
v = cube((n + 1)); // v = 64
v = cube(n); // v = 27
So the question is: why first operation do not make v = 64?
Suppose we have this expression:
#define cube(x) x * x * x
And then we call it:
int n = 3, v;
v = cube(n + 1); // v = 10
v = cube((n + 1)); // v = 64
v = cube(n); // v = 27
So the question is: why first operation do not make v = 64?
Macros are not evaluated (in the sense of the common interpretation of evaluation), they are expanded at compile time.
Before the file is compiled, there is another program called the C Preprocessor that replaces the macro invocation literally/textually and prepares the file for actual compilation, so for your macro
#define cube(x) x * x * x when you do this
This
v = cube(n + 1);
is replaced with this (expaned is the correct term)
v = n + 1 * n + 1 * n + 1;
// Simplifies to
v = n + n + n + 1;
// and again
v = 3 * n + 1;
which for n = 3 gives you 10 exactly the observed result.
Note, that when you add parentheses
v = cube((n + 1));
then, the expansion is
v = (n + 1) * (n + 1) * (n + 1);
which is what you would expect cube() to do, so prevent this you should redefine your macro like this
#define cube(x) ((x) * (x) * (x))
If you are using gcc try
gcc -E source.c
and check the result to verify how the macro was expanded.