jeudi 30 août 2018

if(y&(y=2) so how to deal with this if condition

#include<stdio.h>
int main()
{int y=1;
 if(y&(y=2))
 printf("true %d\n",y);
 else
 printf("false %d\n",y);

return 0;
}

how does the ouput come as true 2? according to me inside the if condition this will happen "if(1&(2))" but the output comes as true 2 .

Aucun commentaire:

Enregistrer un commentaire