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 we can set and clear bit in a byte using macro function?

Answer Posted / sunitha

take i=5;
print its binary value

now for setting a bit
i=i>>5|1;
this will set 5th bit in binary value of 5

now for clearing a bit
i=i>>5 xor 1
this will clear 5th bit in binary value of 5

Is This Answer Correct ?    6 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

‘ C’ PROGRAME TO SHOW THE TYPE OF TRANGLE BY ACCEPTING IT’S LENGTH .

2846


"C" language developed by "Dennis Ritchie" at AT & T. his remarks are a) too general, too abstract b) could deal with only specific problems c) lost generality of BCPL and B restored d) no remarks

1072


formula to convert 2500mmh2o into m3/hr

950


Explain pointer. What are function pointers in C?

1028


What is the difference between char array and char pointer?

1000


a direct address that identifies a location by means of its displacement from a base address or segment a) absolute address b) relative address c) relative mode d) absolute mode

1071


The postoder traversal is 7,14,3,55,22,5,17 Then ur Inorder traversal is??? please help me on this

3520


What is wrong with this declaration?

1054


Does c have an equivalent to pascals with statement?

965


What will be the outcome of the following conditional statement if the value of variable s is 10?

1247


Why c is known as a mother language?

1048


In c programming write a program that will print 10 multiples of 3 except 15,18,21 using looping

1440


What is the total generic pointer type?

1120


Tell me about low level programming languages.

1081


Why is a semicolon (;) put at the end of every program statement?

1042