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 meant by gets in c?
What is time null in c?
What is an identifier?
main() { enum{red,green,blue=6,white}; pf("%d%d%d%d", red,green,blue,white); return 0; } a)0 1 6 2 b)0 1 6 7 c)Compilation error d)None of the above
What is pointer & why it is used?
Write a c program using for loop to print typical pattern if number of rows is entered by keyboard. ABCBA AB BA A A
Write a C program to multiply tho numbers without using arithmetic operator (+, -, *, /).
Is it better to use malloc() or calloc()?
WRITE A PROGRAM IN C TO MULTIPLY TWO 2-D ARRAYS
How can you be sure that a program follows the ANSI C standard?
Write a program to know whether the input number is an armstrong number.
Write a program that takes a 5 digit number and calculates 2 power that number and prints it
5 Answers ABS, Accenture, HCL, Infosys, Infotech, SoftSolve, Software India, TCS, Vertex, Vimukti Technologies,