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

Explain the difference between null pointer and void pointer.

0 Answers   TCS,


What are directives in c?

0 Answers  


What is the proper way of these job Tell me about there full work

0 Answers   EDS,


what does ‘#include’ mean?

1 Answers   TCS,


What is your favorite subject?

1 Answers   Ericsson, Invendis, Tech Mahindra,


how can we Declare a variable in c without defining it.

1 Answers   TCS,


Explain what are the different data types in c?

0 Answers  


What is a loop?

0 Answers  


What is the explanation for cyclic nature of data types in c?

0 Answers  


what will happen if you free a pointer twice after allocating memory dynamically ?

3 Answers   Novell,


logic for generating all the combinations of the any number of given letters. ex::::::::: if a,b,c,d are given the o/p should be abcd,dcba,dbac,bcad,................ 4*3*2*1 combinations............

2 Answers   Infosys,


How can I determine whether a machines byte order is big-endian or little-endian?

0 Answers  


Categories