Answer Posted / banavathvishnu
#include<stdio.h>
#include<conio.h>
Togglebit(int k,int bit)
{
printf("after %d bit is toggled = %d",bit,(k^(1<<(bit-
1))));
return 1;
}
int main()
{
int i;
int bitno;
printf("enter the number \n");
scanf("%d",&i);
printf("enter the bit number to toggle \n");
scanf("%d",&bitno);
Togglebit(i,bitno);
getch();
return 1;
}
| Is This Answer Correct ? | 1 Yes | 4 No |
Post New Answer View All Answers
What is 2 d array in c?
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
Explain how can you restore a redirected standard stream?
Should I use symbolic names like true and false for boolean constants, or plain 1 and 0?
What is c standard library?
What is operator promotion?
What is build process in c?
What is the meaning of ?
Why n++ execute faster than n+1 ?
What is the use of volatile?
Is it fine to write void main () or main () in c?
using only #include
What is new line escape sequence?
State the difference between realloc and free.
What is the advantage of c?