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


Please Help Members By Posting Answers For Below Questions

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.

1569


In a byte, what is the maximum decimal number that you can accommodate?

618


Explain what is the heap?

612


How can I write functions that take a variable number of arguments?

618


Differentiate between calloc and malloc.

747






What is 2 d array in c?

544


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 ].

634


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

5051


how is the examination pattern?

1587


Calculate 1*2*3*____*n using recursive function??

1505


What is #include stdlib h?

608


How does #define work?

638


What is type qualifiers?

649


Explain what are multibyte characters?

616


What is a program?

648