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 |
int far *near * p; means
char ch=10;printf("%d",ch);what is the output
What is the use of the restrict keyword?
write a program for egyptian fractions in c?
What is the purpose of & in scanf?
What extern c means?
what will be the output of this program? void main() { int a[]={5,10,15}; int i=0,num; num=a[++i] + ++i +(++i); printf("%d",num); }
Write a program to compare two strings without using the strcmp() function
42 Answers Accenture, Arba Minch University,
write a programe returns the number of times the character appears in the string
Write an efficient algo and C code to shuffle a pack of cards.. this one was a feedback process until we came up with one with no extra storage.
When should structures be passed by values or by references?
shorting algorithmS