Answer Posted / vadivel t
#include<stdio.h>
int main()
{
int no, bit;
printf("ENTER THE NO AND BIT NO, TO TOGGLE: ");
scanf("%d %d", &
no, &bit);
if(no & (0x1 << bit-1))
{
no = no^(0x1 << bit - 1);
}
else
{
no = no | (0x1 << bit - 1);
}
printf("%d \n", no);
_getch();
}
| Is This Answer Correct ? | 3 Yes | 3 No |
Post New Answer View All Answers
What are near, far and huge pointers?
What is the purpose of realloc()?
What is difference between array and structure in c?
Explain how many levels deep can include files be nested?
Where are local variables stored in c?
Can you please compare array with pointer?
The % symbol has a special use in a printf statement. Explain how would you place this character as part of the output on the screen?
Is there any algorithm to search a string in link list in the minimum time?(please do not suggest the usual method of traversing the link list)
Why use int main instead of void main?
What is structure in c definition?
Explain union.
What is c basic?
Why doesn't C support function overloading?
Is there sort function in c?
What is the need of structure in c?