how to set Nth bit of a variable?
Answer / kirankumaryakkala
ex: int res=16, temp=1,n;
printf("enter the Nth bit no");
scanf("%d",&n);
temp=temp<<n; //leftshift to ntimes
res=res|temp; //bitwise OR
printf("setted nth bit of res %d",res);
| Is This Answer Correct ? | 9 Yes | 4 No |
What is the difference between text files and binary files?
What is enumerated data type in c?
a formula,a series of steps,or well defined set of rules for solving a problem a) algorithem b) program c) erdiagram d) compiler
What does do in c?
why effort estimation is important?
What is the purpose of the preprocessor directive error?
What is anagram in c?
wap in c to accept a number display the total count of digit
How is a null pointer different from a dangling pointer?
How to implement call back functions ?
how can i access hard disk address(physical address)? are we access hard disk by using far,near or huge pointer? if yes then please explain.....
What is && in c programming?