How we can set and clear bit in a byte using macro function?
Answer Posted / sunitha
take i=5;
print its binary value
now for setting a bit
i=i>>5|1;
this will set 5th bit in binary value of 5
now for clearing a bit
i=i>>5 xor 1
this will clear 5th bit in binary value of 5
Is This Answer Correct ? | 6 Yes | 3 No |
Post New Answer View All Answers
what is the difference between class and unio?
what is reason of your company position's in india no. 1.
What are types of preprocessor in c?
I need previous papers of CSC.......plz help out by posting them.......
How does sizeof know array size?
Explain zero based addressing.
Write a programme using structure that create a record of students. The user allow to add a record and delete a record and also show the records in ascending order.
What are dangling pointers? How are dangling pointers different from memory leaks?
Explain what are binary trees?
What are local static variables? How can you use them?
What is && in c programming?
Why #include is used in c language?
If i have an array 0 to 99 i.e,(Size 100) I place the values 1 to 100 randomly like a[0]=29,a[1]=56 upto array[99].. the values are only between 1 to 100. getting the array values by using scanf.. If i entered one wrong element value line a[56]=108. how can i find it.. and also how to find the missing value in 1 to 100.. and i want to replace the missing values.. any one of them know please post your answer..
How do I read the arrow keys? What about function keys?
which of the following is allowed in a "C" arithematic instruction a) [] b) {} c) () d) none of the above