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;  
}
Watch video explanation for this technical question

Leave a Reply

Your email address will not be published. Required fields are marked *