Answer Posted / sanyam jain
#include<stdio.h>
int main()
{
int a,b;
printf("Enter the number to be flipped\n");
scanf("%d",&a);
printf("Enter which bit to be flipped: ");
scanf("%d",&b);
a = a^(1<<(b-1));
printf("Resultan number is %d\n",a);
}
Is This Answer Correct ? | 6 Yes | 3 No |
Post New Answer View All Answers
What is the advantage of c?
write a C program: To recognize date of any format even formats like "feb-02-2003","02-february-2003",mm/dd/yy, dd/mm/yy and display it as mm/dd/yy.
What is the purpose of type declarations?
What does the error message "DGROUP exceeds 64K" mean?
What are register variables? What are the advantage of using register variables?
What is the difference between exit() and _exit() function in c?
An organised method of depicting the use of an area of computer memory used to signify the uses for different parts of the memory a) swap b) extended memory c) memory map d) all of the above
What is getche() function?
What is a pointer in c?
Is c a great language, or what?
in ‘C’ language for Matrix Multiplication fails” Introspect the causes for its failure and write down the possible reasons for its failure.
How do shell structures work?
What are keywords c?
Which of these functions is safer to use : fgets(), gets()? Why?
Can you tell me how to check whether a linked list is circular?