#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 output come as true 2
? According to me inside the if
condition this will happen if( 1 & (2))
but the output comes as true 2
.