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
Is flag a keyword in c?
which is an algorithm for sorting in a growing Lexicographic order
Explain heap and queue.
What is the use of c language in real life?
What is the size of enum in bytes?
How can this be legal c?
What is the difference between #include and #include 'file' ?
What are header files in c programming?
A c program to display count values from 0 to 100 and flash each digit for a secong.reset the counter after it reaches 100.use for loop,. pls guys hepl me.. :(
How will you find a duplicate number in a array without negating the nos ?
What does & mean in scanf?
What language is windows 1.0 written?
Is it cc or c in a letter?
What is the difference between functions getch() and getche()?
Write a program for finding factorial of a number.