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

Explain what is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?

851


What is volatile keyword in c?

772


Why c is called a mid level programming language?

818


Is c still relevant?

839


What is volatile variable in c with example?

775


How are 16- and 32-bit numbers stored?

962


Compare array data type to pointer data type

805


List some applications of c programming language?

729


Can you write the algorithm for Queue?

1743


What is %d called in c?

930


What would the following code segment printint k = 8;docout << "k = " << k << " ";while k++ < 5; a) 13 b) 5 c) 8 d) pointers

947


What would happen to X in this expression: X += 15; (assuming the value of X is 5)

1656


Explain how many levels deep can include files be nested?

811


What are the types of pointers in c?

734


Study the following C program :call_me (myvar)int myvar;{ myvar +- 5; }main(){int myvar;myvar = 3;call_me(myvar);printf("%d ",myvar);What will be printed a) 3 b) 5 c) 8 d) symbol

910