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

What is pragma in c?

630


write a proram to reverse the string using switch case?

2470


Explain why can’t constant values be used to define an array’s initial size?

857


Why pointers are used in c?

592


What are the two types of structure?

579






Explain is it valid to address one element beyond the end of an array?

737


What is the size of structure pointer in c?

614


What does s c mean in text?

616


Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?

580


How old is c programming language?

581


Why doesnt the call scanf work?

676


What are dangling pointers in c?

645


What is a pragma?

671


How to Throw some light on the splay trees?

622


Where does the name "C" come from, anyway?

646