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
What is getche() function?
What are Macros? What are its advantages and disadvantages?
Write a program to print fibonacci series using recursion?
What are the basic data types associated with c?
Differentiate call by value and call by reference?
What are the advantages of c preprocessor?
What is sizeof return in c?
How to declare a variable?
Array is an lvalue or not?
What is difference between function overloading and operator overloading?
Why isn't any of this standardized in c? Any real program has to do some of these things.
Explain the difference between call by value and call by reference in c language?
how to make a scientific calculater ?
why wipro wase
Why is c called c?