Answer Posted / sumit kumar
Take the input 5 from keyword :-
#include<stdio.h>
main()
{
int num,pos;
printf("enter the no.:");
scanf("%d",&num);
printf("enter the position:");
scanf("%d",&pos);
if(num & (1<<pos))
{
printf("pos is set");
}
else
{
printf("pos is not set");
}
}
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What is #define size in c?
The difference between printf and fprintf is ?
What is the correct declaration of main?
What is c preprocessor mean?
c language interview questions & answer
What are the types of unary operators?
How can you check to see whether a symbol is defined?
What is the difference between malloc() and calloc()?
Does c have class?
What is the modulus operator?
What does void main () mean?
Explain what is a program flowchart and explain how does it help in writing a program?
What type is sizeof?
int main() { Int n=20,i; For(i=0;i<=n;i--) { Printf(“-“); Return 0;
Which is more efficient, a switch statement or an if else chain?