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 does calloc stand for?
Can include files be nested? How many levels deep can include files be nested?
What is the explanation for cyclic nature of data types in c?
How to write a multi-statement macro?
Can we assign string to char pointer?
Explain how can you avoid including a header more than once?
What is c mainly used for?
What are the two forms of #include directive?
Which of the following operators is incorrect and why? ( >=, <=, <>, ==)
1. Write a function to display the sum of two numbers in the following ways: By using (i) pass by value (ii) pass by address a. function with argument and with return value b. function with argument and without return value c. without argument , with return value d. without argument , without return value Note: Use pass by address.
What is the use of c language in real life?
What is cohesion in c?
a c variable cannot start with a) an alphabet b) a number c) a special symbol d) both b and c above
What is define c?
What do you mean by keywords in c?