How to Clear last bit if it 1 using Macro TURN_OFF_BIT_LAST
Answers were Sorted based on User's Feedback
Answer / narendra
#define TURN_OFF_BIT_LAST(x) ((~0) >> 1) & x)
in the question it is asking to clear MSB not LSB
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / manoj
#define TURN_OFF_BIT_LAST(x) ((x) & 1) ? ((x) &= ((~0) <<
1)):(x)=(x)
Is This Answer Correct ? | 0 Yes | 2 No |
general for is %wd,f-d; in this system "w" means a) 'w' represent total width of digits b) 'w' represent width which includes the digits before,after decimal place and the decimal point c) 'w' represent width which includes the digits before only d) 'w' represent width after decimal place only
What is zero based addressing?
Should I use symbolic names like true and false for boolean constants, or plain 1 and 0?
to find the closest pair
Tell us two differences between new () and malloc ()?
When is a null pointer used?
What is the difference between int main and void main?
When do you say that a digraph is acyclic A)if and only if its first search does not have back arcs B)a digraph is acyclic if and only if its first search does not have back vertices C)if and only if its first search does not have same dfnumber D)None of these
Compare and contrast compilers from interpreters.
do ne body have any idea about the salary for the we r going to have interview. yup .. u got it right ..i m talking abt NIC.
What are keywords in c with examples?
How to implement a packet in C