int a;
scanf("%i", &a);
printf("%i", a&&1);
In this program, no matter the input it spits out a 1, even when I try even numbers. The only exception is when a = 0. I might not be understanding the AND operator correctly, but for any even number shouldn't the output be 0?