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
write a program that declares an array of 30 elements named "income" in the main functions. then cal and pass the array to a programmer-defined function named "getIncome" within the "getIncome" function, ask the user for annual income of 30 employees. then calculate and print total income on the screen using the following function: "void getIncome ( ai []);
What does the message "automatic aggregate intialization is an ansi feature" mean?
What are derived data types in c?
What is function prototype in c language?
What are conditional operators in C?
What is the use of define in c?
Design a program which assigns values to the array temperature. The program should then display the array with appropriate column and row headings.
How is a null pointer different from a dangling pointer?
What is hash table in c?
What is the concatenation operator?
How can I do peek and poke in c?
What is difference between main and void main?
What is the difference between memcpy and memmove?
How can I split up a string into whitespace-separated fields?
What is main () in c?