How to Clear last bit if it 1 using Macro TURN_OFF_BIT_LAST
Answer Posted / asdf
#define TURN_OFF_BIT_LAST(x) ((~0) << 1) & x)
Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
write a program to reverse a every alternetive words in a string in a place. EX: Input is "this is the line of text" Output should be "shit is eht line fo text" Please any one tell me code for that.
In a byte, what is the maximum decimal number that you can accommodate?
Explain what is the heap?
How can I write functions that take a variable number of arguments?
Differentiate between calloc and malloc.
What is 2 d array in c?
Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [ I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].
Write a function expand(s1,s2) that expands shorthand notations like a-z in the string s1 into the equivalent complete list abc...xyz in s2 . Allow for letters of either case and digits, and be prepared to handle cases like a-b-c and a-z0-9 and -a-z. z-a:zyx......ba -1-6-:-123456- 1-9-1:123456789987654321 a-R-L:a-R...L a-b-c:abbc
how is the examination pattern?
Calculate 1*2*3*____*n using recursive function??
What is #include stdlib h?
How does #define work?
What is type qualifiers?
Explain what are multibyte characters?
What is a program?