how to set Nth bit of variable by using MACRO
Answer Posted / kirankumaryakkala
#define set(val,n) val|=1<<n //do left-shift then bitwise OR
logic is val|=1<<n
means,
first shift the value 1 to ntimes and do the bitwise or with
value.
u will get the answer
| Is This Answer Correct ? | 30 Yes | 6 No |
Post New Answer View All Answers
Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
What are two dimensional arrays alternatively called as?
hi... can anyone help me to make a two-dimensinal arrays in finding the sum of two elements plzzz. thnx a lot...
How can I do peek and poke in c?
What is the code in while loop that returns the output of given code?
Why we write conio h in c?
Create a simple code fragment that will swap the values of two variables num1 and num2.
What is static identifier?
What is enumerated data type in c?
please give me a VIRTUSA sample palcement papers.... you will only send TECHNICAL SECTION..... that is help for me Advance Thanks........................
How do you initialize pointer variables?
Why is c so powerful?
Combinations of fibanocci prime series
What is your stream meaning?
what are non standard function in c