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
Hai,I have done with my bachelor of commerce and planing to ms,please suggest me how to convince vo for shifting from commerce to computers. Visa on 8 DEC 2014 Npu university
What does return 1 means in c?
On most computers additional memory that is accessed through an adapter of feature card along with a device driver program. a) user memory b) conventional memory c) expandedmemory d) area
What is assert and when would I use it?
What are the 4 types of functions?
a program that performs some preliminary processing in C, it acts upon certain directives that will affect how the compiler does its work a) compiler b) loader c) directive d) preprocessor
What is c variable?
What is wrong with this initialization?
How to write a code for implementing my own printf() and
scanf().... Please hep me in this... I need a guidance...
Can you give an coding for c... Please also explain about
the header files used other than #include
What is the use of function overloading in C?
Write a Program to find whether the given number or string is palindrome.
What is c language in simple words?
What is c language & why it is used?
In c programming write a program that will print 10 multiples of 3 except 15,18,21 using looping
What is pointer to pointer in c?