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
Is int a keyword in c?
Mention four important string handling functions in c languages .
What does emoji p mean?
What is function definition in c?
Can you please explain the difference between syntax vs logical error?
Can you explain the four storage classes in C?
is it possible to create your own header files?
How do you construct an increment statement or decrement statement in C?
Why we use conio h in c?
What is the difference between #include and #include 'file' ?
What is structure padding in c?
Is fortran still used today?
Write a program to print "hello world" without using a semicolon?
What is the correct code to have following output in c using nested for loop?
What are the different types of endless loops?