write a c program to check weather a particluar bit is set
or not?
Answer Posted / valli
#include<stdio.h>
main()
{
int n,p;
printf("enter number");
scanf("%d",&n);
printf("enter the position");
scanf("%d",&p);
if(n&(1<<p))
printf("the bit is set");
else
printf("the bit is clear");
}
| Is This Answer Correct ? | 12 Yes | 3 No |
Post New Answer View All Answers
What language is windows 1.0 written?
What is #include stdlib h?
Describe the modifier in c?
Explain how can you tell whether a program was compiled using c versus c++?
Explain can static variables be declared in a header file?
Write a program to identify if a given binary tree is balanced or not.
What is a dynamic array in c?
What is the difference between far and near in c?
What does it mean when the linker says that _end is undefined?
What is anagram in c?
What happens if header file is included twice?
Write a program, where i have a grid with many cells, how many paths are possible from one point to other desired points.
When would you use a pointer to a function?
Define Array of pointers.
hai iam working in sap sd module for one year and working in lumax ind ltd in desp department but my problem is i have done m.b.a in hr/marketing and working sap sd there is any combination it. can you give right solution of my problem. and what can i do?