C Programming :: Bitwise Operators
-
Which of the following statements are correct about the program?
#include
int main() { unsigned int num; int i; scanf("%u", #); for(i=0; i16; i++) { printf("%d", (num115)?1:0); } return 0; } -
Which of the following statements are correct about the program?
#include
int main() { unsigned int num; int c=0; scanf("%u", #); for(;num;num>>=1) { if(num & 1) c++; } printf("%d", c); return 0; } -
Which of the following statements are correct about the program?
#include
-
Which of the following statements are correct about the program?
#include
int main() { unsigned int m[] = {0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80}; unsigned char n, i; scanf("%d", &n); for(i=0; i7; i++) { if(n & m[i]) printf("yes"); } return 0; }