Write the macros to set, clear, toggle and check the bit of a given integer
belongs to collection: Interview questions on bitwise operators in C
All Answers
total answers (1)
belongs to collection: Interview questions on bitwise operators in C
total answers (1)
Let see an example to set the bit using the above macro,
Output:
Enter the value
5
Enter the position you want to Set
1
1th Bit Set Now value will be = 0x7
need an explanation for this answer? contact us directly to get an explanation for this answer