Program to check whether the given number is odd or even using bitwise operator.
#include<stdio.h>
int main() {
int n;
scanf("%d",&n);
(n&1)?printf("Odd Number."):printf("Even Number.");
return 0;
}
OUTPUTint main() {
int n;
scanf("%d",&n);
(n&1)?printf("Odd Number."):printf("Even Number.");
return 0;
}
10
Even Number.
Even Number.