Given an unsigned integer, find if the number is power of 2?
Answer Posted / veerendra jonnalagadda
main()
{
int i;
printf("Enter Number :");
scanf("%d",&i);
if(i&(i-1))
printf("Not atwo power");
else
printf("Two 's Power");
}
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
What is a #include preprocessor?
What does 1f stand for?
How can I do peek and poke in c?
we need to calculating INCOME TAX for the person. The INCOME TAX is as follows:- First $10000/- of income : 4% tax Next $10000/- of income : 8% tax Next $10000/- of income : 11.5% tax above $10, 00,00/- : 15% tax What is the Solution of this Question ?
In c programming write a program that will print 10 multiples of 3 except 15,18,21 using looping
What is uint8 in c?
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.....
why programs in c are running with out #include
Why is c not oop?
regarding pointers concept
to find the closest pair
What is the use of getchar() function?
What does the c preprocessor do?
writ a program to compare using strcmp VIVA and viva with its output.
Why is c called c not d or e?