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 TOGGLE Nth bit of variable in a MACRO



how to TOGGLE Nth bit of variable in a MACRO..

Answer / kiran kumar yakkala

#define ~toggle(val,n) var^=1<<n


Is This Answer Correct ?    8 Yes 2 No

Post New Answer

More C Interview Questions

dennis ritchie invented C language in AT&T bell laboratory what is the extension of AT&T?

4 Answers  


What is indirection?

0 Answers  


Explain the use of fflush() function?

0 Answers  


Why malloc is faster than calloc?

0 Answers  


What compilation do?

7 Answers   Geometric Software, Infosys,


Whats wrong with the following function char *string() { char *text[20]; strcpy(text,"Hello world"); return text; }

3 Answers   Qualcomm,


What are data structures in c and how to use them?

0 Answers  


You are to write your own versions of strcpy() and strlen (). Call them mystrcpy() and mystrlen(). Write them first as code within main(), not as functions, then, convert them to functions. You will pass two arrays to the function in the case of mystrcpy(), the source and target array.

0 Answers  


How can I avoid the abort, retry, fail messages?

0 Answers  


Differentiate between null and void pointers.

0 Answers   TCS,


How to print "Hi World" without using semi colon?

6 Answers   Infosys,


what is the difference between these initializations? Char a[]=”string”; Char *p=”literal”; Does *p++ increment p, or what it points to?

4 Answers  


Categories