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
How can I pad a string to a known length?
What is the use of ?: Operator?
How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?
How to write a code for implementing my own printf() and
scanf().... Please hep me in this... I need a guidance...
Can you give an coding for c... Please also explain about
the header files used other than #include
‘ C’ PROGRAME TO SHOW THE TYPE OF TRANGLE BY ACCEPTING IT’S LENGTH .
What is line in c preprocessor?
Which one would you prefer - a macro or a function?
What is function pointer c?
What is the heap?
Do you know the difference between exit() and _exit() function in c?
What is table lookup in c?
What is c preprocessor mean?
How are portions of a program disabled in demo versions?
What are terms in math?
What are the 4 data types?