Bitwise Operators - Point Out Correct Statements Multiple Questions and Answers.




1.Which of the statements is correct about the program?
A. It prints all even bits from num
B. It prints all odd bits from num
C. It prints binary equivalent num
D. Error

2.Which of the statements is correct about the program?
A. It counts the number of bits that are ON (1) in the number num.
B. It counts the number of bits that are OFF (0) in the number num.
C. It sets all bits in the number num to 1
D. Error

3.Which of the statements is correct about the program?
A. It converts a number to a given base.
B. It converts a number to its equivalent binary.
C. It converts a number to its equivalent hexadecimal.
D. It converts a number to its equivalent octal.

4.Which of the statements is correct about the program?
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.




Date to Date Current Affairs 2022

PakMCQs.net

Quick Links

GAT Subject



   Computer Science    English Mcqs    Agriculture    

Engineering



   Computer Science    Civil Engineering    

Technical



   Networking    Electronics    Database    

Past Papers



   Model Papers    FPSC Papers