For example, I define AA for three times, is it legal?:
#include #define AA 10 #define AA 20 #define AA 30 int main() { printf(\"
Lets start by correcting your printf to something useful: printf("%d", AA);
printf("%d", AA);
Compiling it with gcc will produce two warnings that "AA" is redefined. Warnings are really important and should be avoided in C, but the result will be as expected (30).
gcc