This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

BOLD

#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

Parents Reply Children