C Programming - Bitwise Operators - Discussion

5. 

Bitwise | can be used to set multiple bits in number.

[A]. Yes
[B]. No

Answer: Option A

Explanation:

No answer description available for this question.

Sathya said: (May 10, 2011)  
How to set multiple bits in bitwise. Any one explain me.

Peeyush said: (Jul 30, 2011)  
You can set them by doing OR operation.

If you have bits: 0000

Then you can set all of them using 1111 and bitwise | operation.

0000 | 1111 = 1111

Anand R K said: (Nov 14, 2011)  
Oh thanks peeyush.

Adil said: (May 23, 2017)  
Is it valid for all the binary numbers?

Post your comments here:

Name *:

Email   : (optional)

» Your comments will be displayed only after manual approval.