My question may be too easy, but I have not found the answer, sorry for that.
if I have some code like this:
...
#define N 6
...
float a, b;
...
a = 2.0 * 3 * N * b;
...
then, after compilation, will this code become something like this?
...
a = 36.0 * b;
...
In other words, the constant part will be calculated at compile time, right?
Thank you in advance.
Most likely, but not guaranteed.
You can try and look at the disassembly of your program (either in a debugger, or in a disassembler or use a compiler switch (if available) to produce assembly code from your C code).