1.

Which of the following statements are correct about the program?_x000D_ #include_x000D_ _x000D_ int main()_x000D_ {_x000D_ unsigned int m[] = {0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80};_x000D_ unsigned char n, i;_x000D_ scanf("%d", &n);_x000D_ for(i=0; i<=7; i++)_x000D_ {_x000D_ if(n & m[i])_x000D_ printf("yes");_x000D_ }_x000D_ return 0;_x000D_ }

A. It will put OFF all bits that are ON in the number n
B. It will test whether the individual bits of n are ON or OFF
C. It will put ON all bits that are OFF in the number n
D. It will report compilation errors in the if statement.
Answer» C. It will put ON all bits that are OFF in the number n


Discussion

No Comment Found

Related MCQs