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 difference between far and near ?
Where local variables are stored in c?
What are the disadvantages of a shell structure?
How can you be sure that a program follows the ANSI C standard?
‘SAVEPOINT’ and ‘ROLLBACK’ is used in oracle database to secure the data comment. Give suitable examples of each with sql command.
What is hash table in c?
How is = symbol different from == symbol in c programming?
What is pointer & why it is used?
What is int main () in c?
What does void main () mean?
What kind of structure is a house?
how many errors in c explain deply
Does c have enums?
Is there any data type in c with variable size?
What is d scanf?