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

What is exit() function?

0 Answers  


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

2 Answers   Facebook,


write a program to find out prime number using sieve case?

0 Answers   HCL,


Is c functional or procedural?

1 Answers  


how i m write c program 1.check prime number 2.prime number series

1 Answers  






Is int a keyword in c?

0 Answers  


What is the proper way of these job Tell me about there full work

0 Answers   EDS,


What is calloc malloc realloc in c?

0 Answers  


Is c a great language, or what?

0 Answers  


what is difference between array of characters and string

18 Answers   Accenture, Nest,


how many argument we can pas in in a function

25 Answers   CTS,


The performance of an operation in several steps with each step using the output of the preceding step a) recursion b) search c) call by value d) call by reference

0 Answers  


Categories