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
Array is an lvalue or not?
Is c a great language, or what?
Write a program to check prime number in c programming?
How can I split up a string into whitespace-separated fields?
What does emoji p mean?
What is the purpose of main() function?
Which is best book for data structures in c?
void main(int n) { if(n==0) return; main(--n); printf("%d ",n); getch(); } how it work and what will be its output...............it any one know ans plz reply
Why isn't any of this standardized in c? Any real program has to do some of these things.
what is stack , heap ,code segment,and data segment
What is the main difference between calloc () and malloc ()?
will u please send me the placement papers to my mail???????????????????
How do you use a 'Local Block'?
How can I write a function that takes a format string and a variable number of arguments?
Write a C++ program to generate 10 integer numbers between - 1000 and 1000, then store the summation of the odd positive numbers in variable call it sum_pos, then find the maximum digit in this variable regardless of its digits length.