Operators on C# related Questions and Answers


Question :   Suppose n is a variable of the type Byte and we wish to put OFF its fourth bit (from right) without disturbing any other bits. Which of the following statements will do this correctly?
1. n = n && HF7
2. n = n & 16
3. n = n & 0xF7
4. n = n & HexF7
5. n = n & 8
Answer :   3 - n = n & 0xF7  

* Be the First to Post a Comment.

Submit comment :


Captcha Image
Reload

Ask Question

Captcha Image
Reload

Note : Name and Email never shown.





Subscribe


Become a part of EducationForever. Subscribe to our FREE Newsletter