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 |
what is available in C language but not in C++?
10 Answers CTS, TCS,
related to rdbms query .
c program to manipulate x=1!+2!+3!+...+n! using recursion
What does a derived class inherit from a base class a) Only the Public members of the base class b) Only the Protected members of the base class c) Both the Public and the Protected members of the base class d) .c file
how can i calculate mean,median,mode by using c program
What is the size of empty structure in c?
Write the syntax and purpose of a switch statement in C.
What is volatile
main() { printf("\n %d %d %d",sizeof('3'),sizeof("3"),sizeof(3)); }
Can anyone tell what is stack overflow? what precaution we should take?
main() { int x=10,y=15; x=x++; y=++y; printf("%d %d\n",x,y); } output??
19 Answers EBS, Ramco, Sangwin, TCS,
How to explain the final year project as a fresher please answer with sample project