KodeGod.com

014. Technical interview question: Check number is even or odd without using arithmetic or relational operator in detail

 
int main()
{
   int number; 
   printf("Please input an integer number: ");
   scanf("%d", &number); 
   (number & 0x01) ? printf("%d is an EVEN Number.", number) :  printf("%d is an ODD Number.", number) ;
   printf("\n");
   return 0;  
}