Answer Posted / santhi perumal
#include<stdio.h>
#include<conio.h>
int main()
{
int number;
int position;
int result;
printf("Enter the Number\n");
scanf("%d",&number);
printf("Enter the Position\n");
scanf("%d",&position);
result = (number >>(position-1));
if(result & 1)
printf("Bit is Set");
else
printf("Bit is Not Set");
}
Is This Answer Correct ? | 18 Yes | 7 No |
Post New Answer View All Answers
Write a program to use switch statement.
What is sizeof in c?
Explain can static variables be declared in a header file?
How pointer is different from array?
What are the header files used in c language?
what is the c source code for the below output? 10 10 10 10 10 10 10 10 10 10 9 9 7 6 6 6 6 6 6 9 7 5 9 7 3 2 2 5 9 7 3 1 5 9 7 3 5 9 7 4 4 4 4 5 9 7 8 8 8 8 8 8 8 8 9
What is an identifier?
Do pointers store the address of value or the actual value of a variable?
What is the sizeof () operator?
Is stack a keyword in c?
How do I read the arrow keys? What about function keys?
What is variable declaration and definition in c?
What is the code in while loop that returns the output of given code?
What functions are in conio h?
When is a “switch” statement preferable over an “if” statement?