Answer Posted / vadivel t
#include<stdio.h>
int main()
{
int no, bit;
printf("ENTER THE NO AND BIT NO, TO TOGGLE: ");
scanf("%d %d", &
no, &bit);
if(no & (0x1 << bit-1))
{
no = no^(0x1 << bit - 1);
}
else
{
no = no | (0x1 << bit - 1);
}
printf("%d \n", no);
_getch();
}
| Is This Answer Correct ? | 3 Yes | 3 No |
Post New Answer View All Answers
Where are c variables stored in memory?
how is the examination pattern?
What are the various types of control structures in programming?
What is methods in c?
Why do we use return in c?
What is the difference between union and anonymous union?
Is array a primitive data type in c?
Are the variables argc and argv are always local to main?
What are the types of data types and explain?
Can you tell me how to check whether a linked list is circular?
What are extern variables in c?
How many types of sorting are there in c?
What is the meaning of c in c language?
main() { printf("hello"); fork(); }
How can I ensure that integer arithmetic doesnt overflow?