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...


Write a function that accepts two numbers,say a and b and
makes bth bit of a to 0.No other bits of a should get
changed.

Answers were Sorted based on User's Feedback



Write a function that accepts two numbers,say a and b and makes bth bit of a to 0.No other bits of..

Answer / sandeep ambekar

Macro to Set a particular Bit..
#define SetBit(x,y) x | 0x1<<y

Macro to Clear a particular Bit..
#define ClearBit(x,y) x & ~(0x1<<y)

Is This Answer Correct ?    5 Yes 2 No

Write a function that accepts two numbers,say a and b and makes bth bit of a to 0.No other bits of..

Answer / ramkumar

int func(int a,int b)
{
int ans;
ans = a - 2^b;
return ans;
}

Is This Answer Correct ?    0 Yes 7 No

Post New Answer

More C Interview Questions

if array a conatins 'n' elements and array b conatins 'n-1' elements.array b has all element which are present in array a but one element is missing in array b. find that element.

18 Answers   Parexel, Ram Infotech, Zycus Infotech,


define function

4 Answers   Assurgent, Sonata,


What is a const pointer in c?

0 Answers  


Is it fine to write void main () or main () in c?

0 Answers  


#define MAX 3 main() { printf("MAX = %d \n",MAX ); #undef MAX #ifdef MAX printf("Vector Instituteā€); #endif

4 Answers   IBM, Vector,


main difference between c and c++ language

1 Answers  


void main() { int a=1; printf("%d %d %d",a,++a,a++); } the output is supposed to be 1 2 2....but it is 3 3 1 this is due to calling conventions of C. if anyone can explain me how it happens?

7 Answers  


How many types of errors are there in c language? Explain

0 Answers  


What is a symbolic constant?

1 Answers  


IS Doon college of Engn.. has good faculty

1 Answers  


Famous puzzles which are generally asked by companies during interviews ?

1 Answers   3D PLM, Yahoo,


Difference between data structure and data base.

7 Answers   CTS, Value Labs, Zoho,


Categories