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
write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.
Explain pointers in c programming?
Was 2000 a leap year?
explain how do you use macro?
what is the significance of static storage class specifier?
Tell us the use of fflush() function in c language?
How can I determine whether a machines byte order is big-endian or little-endian?
What does 4d mean in c?
What is meant by type casting?
how to construct a simulator keeping the logical boolean gates in c
How do you generate random numbers in C?
In c programming write a program that will print 10 multiples of 3 except 15,18,21 using looping
Write a program to print “hello world” without using semicolon?
What is the difference between a function and a method in c?
What do you mean by command line argument?