We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
#define A 100
void main() { int b=0; int c=30;
while(1) { b++; if(b>1000) b=0; if(abs(b-c)>10) { #ifdef A #undef A #define A 200 #endif
print("A1= %d",A); } else { #ifdef A #undef A #define A 300 #endif
print("A2= %d",A); }
} }
taget result A1 =200 A2 = 300
I want to ask, Dos the #undef rules meet The C standard specifies? thank you