2 + 3 * 2 + 3 ? = 2+ 5+ 3 = 11
#define SQUARE(x) ((x) * (x)) test this
Quote:
#include <stdio.h>
#define SQUARE(x) ((x) * (x))
int main() {
int result = SQUARE(2 + 3);
printf("Result: %d\n", result);
return 0;
}
|
use ChatGPT for this art of questions, it helps.
I use it when i analyse my code, is a nice helper tool.
PS: dont forget the math laws.
and "#define" only change the macro text, not more, be careful