How to print 0 if input is even and 1 if input is odd without using control statements?
Printf("Enter any number:”);
Printf("result = %d”,1&num);
How this code work?
For this you should know about & operator. This is
binary AND operator. And there is an common fact about even number i.e. every
even number has 0 at the end in binary form and every odd number has 1 at the
end in binary form.