Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to Clear last bit if it 1 using Macro TURN_OFF_BIT_LAST

Answers were Sorted based on User's Feedback



How to Clear last bit if it 1 using Macro TURN_OFF_BIT_LAST..

Answer / mohit jain

#define TURN_OFF_BIT_LAST(x) ((x) & ~1)

Is This Answer Correct ?    27 Yes 1 No

How to Clear last bit if it 1 using Macro TURN_OFF_BIT_LAST..

Answer / asdf

#define TURN_OFF_BIT_LAST(x) ((~0) << 1) & x)

Is This Answer Correct ?    2 Yes 1 No

How to Clear last bit if it 1 using Macro TURN_OFF_BIT_LAST..

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

How to Clear last bit if it 1 using Macro TURN_OFF_BIT_LAST..

Answer / dorian

#define TURN_OFF_BIT_LAST(x) ((x >> 1) << 1)

Is This Answer Correct ?    2 Yes 4 No

How to Clear last bit if it 1 using Macro TURN_OFF_BIT_LAST..

Answer / manoj

#define TURN_OFF_BIT_LAST(x) ((x) & 1) ? ((x) &= ((~0) <<
1)):(x)=(x)

Is This Answer Correct ?    0 Yes 2 No

How to Clear last bit if it 1 using Macro TURN_OFF_BIT_LAST..

Answer / raj

n&0x11111110

Is This Answer Correct ?    4 Yes 9 No

Post New Answer

More C Interview Questions

What is Dynamic Initialization.

3 Answers  


Why c is procedure oriented?

0 Answers  


write an algorithm to get a sentence and reverse it in the following format: input : I am here opuput: Here Am I note: first letter of every word is capiatlised

3 Answers  


which types of data structure will i use to convert infix to post fix???

5 Answers   IIT,


how does a general function , that accepts an array as a parameter, "knows" the size of the array ? How should it define it parameters list ?

2 Answers   Patni, TCS,


any C program contains only one function, it must be a) void () b) main () c) message () d) abc ()

0 Answers  


What is the difference between fread buffer() and fwrite buffer()?

0 Answers  


can a union be self-referenced?

1 Answers  


Explain how does free() know explain how much memory to release?

0 Answers  


#include main() { char s[] = "Bouquets and Brickbats"; printf(" %c, ",*(&s[2])); printf("%s, ",s+5); printf(" %s",s); printf(" %c",*(s+2)); }

0 Answers   Wilco,


Why c is called free form language?

0 Answers  


1. main() { printf("%d",printf("HelloSoft")); } Output?

3 Answers   HCL,


Categories