c - Why does my text not print? -


why printf() not called in case? can use && in case or what?

{     int zz1,zz2;    zz1 = 8;    zz2= zz1 / 2;    if ( (zz1==! 0 ) && (zz2 ==! 1 ) ){       printf("!!!!!!!!!!");    } } 

i think write (zz1 != 0 ) && (zz2 != 1 ).

actually (zz1 == !0 ) && (zz2 == !1 ) valid syntax in case produces unwanted result because writing:

  1. zz1 equals (not)0 , zz2 equals (not)1
  2. that zz1 equals 1 , zz2 equals 0
  3. that false , printf not called

Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

php - joomla get content in onBeforeCompileHead function -