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 does calloc stand for?

0 Answers  


How many data structures are there in c?

0 Answers  


What is sizeof c?

0 Answers  


What do you mean by invalid pointer arithmetic?

0 Answers  


prototype of sine function.

2 Answers   Cadence,


An organised method of depicting the use of an area of computer memory used to signify the uses for different parts of the memory a) swap b) extended memory c) memory map d) all of the above

0 Answers  


Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates

3 Answers  


#&#8206;include&#8236;<stdio.h> void main() { int i; for(i=5;0;i++) { printf("%d",i); } }

2 Answers   Facebook,


Which one would you prefer - a macro or a function?

0 Answers  


1) write a program to generate 1st n fibonacci prime numbers using Nested if 2) write a program to generate twin prime numbers from m to n using nested if 3) write a program to check whether a given integer is a strong number or not using nested if 4) Write a program to generate prime factors of a given integer using nested if 5)write a program to generate prime numbers from m to n using nested if 6)write a program to generate perfect numbers from m to n using nested if 7)write a program to generate the pallindromes from m to n using neste if 8)write a program to generate armstrong numbers from m to n using nested if 9)write a program to generate strong numbers from m to n using nested if

0 Answers   TCS,


What is difference between the following 2 lines…. int temp = (int)(0x00); int temp = (0x00int);

3 Answers   Bosch,


What is the output of the program given below #include<stdio.h> main() { char i=0; for(;i>=0;i++) ; printf("%d\n",i); }

21 Answers   ADITI, Student, TCS,


Categories