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
What is a void pointer? When is a void pointer used?
What does %p mean c?
will u please send me the placement papers to my mail???????????????????
What is null pointer constant?
What is header file definition?
Explain how do you search data in a data file using random access method?
What is c++ used for today?
Explain is it better to bitshift a value than to multiply by 2?
What is n in c?
a value that does not change during program execution a) variabe b) argument c) parameter d) none
Is c weakly typed?
Suppose we have a table name EMP as below. We want to perform a operation in which, I want to change name ‘SMITH’ from as ‘SMITH JAIN’. Also I want to change the name of the column from ENAME to E_NAME. EMPNO ENAME JOB MGR HIREDATE SAL 7369 SMITH Coder 7902 17-DEC-80 800 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 7521 WARD SALESMAN 7698 22-FEB-81 1250
Explain what is wrong with this program statement?
write a C program:There is a mobile keypad with numbers 0-9 and alphabets on it. Take input 0f 7 keys and then form a word from the alphabets present on the keys.
Can a variable be both const and volatile?