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 |
hi, which software companys will take,if d candidate's % is jst 55%?
logic for x=y^n
related to rdbms query .
What is the purpose of void in c?
. Consider the following program main() { int a[5]={1,3,6,7,0}; int *b; b=&a[2]; } The value of b[-1] is (A) 1 (B) 3 (C) -6 (D) none
Program to find largest of three numbers without using comparsion operator?
write a program to swap two numbers without using temporary variable?
What is a static variable in c?
Explain how can you tell whether two strings are the same?
Why does the call char scanf work?
Explain what are run-time errors?
What are the commands should be given before weiting C Program i.e, Cd.. like
4 Answers IBM, Infonet, Satyam, Tech Mahindra,