APC-SPS-007.c (449B)
1 /* 2 * Author: Amit Dutta (amitdutta4255@gmail.com) | Date: 12 Dec 2025 3 * Repo: https://github.com/notamitgamer/bsc 4 * License: MIT 5 */ 6 7 /* WAP to check a number is even or odd using bitwise operator */ 8 9 #include<stdio.h> 10 int main() { 11 int x, res = 1; 12 printf("Enter a number : "); 13 scanf("%d", &x); 14 res = res & x; 15 if (res == 0) { 16 printf("\nInput %d is a even number.", x); 17 } 18 else { 19 printf("\nInput %d is a odd number.", x); 20 } 21 return 0; 22 }