c function to check whether a given number is even or odd. code example
Example 1: even odd numer c
if( num % 2 == 0 )
printf("EVEN!\n");
else
printf("ODD!\n");
Example 2: how to know if a number is even in c
if((x & 1) == 0)
printf("EVEN!\n");
else
printf("ODD!\n");