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

What is chain pointer in c?

1068


Is c is a middle level language?

1071


What is a buffer in c?

1010


Please send me WIPRO technical question to my mail ID.. its nisha_g28@yahoo.com please its urgent

2135


Explain 'far' and 'near' pointers in c.

1148


Can we change the value of static variable in c?

1035


What are the different types of C instructions?

1320


Differentiate between a structure and a union.

1296


Describe the steps to insert data into a singly linked list.

1078


Why header files are used?

1124


How is pointer initialized in c?

1033


Do you know the use of 'auto' keyword?

1204


What is %d used for?

1043


Multiply an Integer Number by 2 Without Using Multiplication Operator

772


what is the difference between class and unio?

2370