how to find a 5th bit is set in c program

Answer Posted / rajkumar

#include<stdio.h>
void main()
{
int a;
a=a>>4;
if(a%2==1)
printf("the bit is set");
else
printf("the bit is not set");
}

Is This Answer Correct ?    9 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When should a type cast be used?

577


How can I pad a string to a known length?

614


Explain how can I right-justify a string?

629


What is a memory leak? How to avoid it?

580


Explain how can you tell whether two strings are the same?

587






What are multibyte characters?

649


Where are the auto variables stored?

630


any limit on the number of functions that might be present in a C program a) max 35 functions b) max 50 functions c) no limit d) none of the above

636


What is use of #include in c?

605


Hai what is the different types of versions and their differences

1495


Difference between Shallow copy and Deep copy?

1576


Why doesn't C support function overloading?

1626


What is a keyword?

753


Hi can anyone tell what is a start up code?

1622


How can I find out the size of a file, prior to reading it in?

630