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 ? | 3 Yes | 0 No |
Post New Answer View All Answers
What are types of preprocessor in c?
Why isnt any of this standardized in c?
How does free() know explain how much memory to release?
Write a program to reverse a string.
What is pass by reference in c?
What is graph in c?
What is define c?
program to find error in linklist.(i.e find whether any node point wrongly to previous nodes instead of next node)
How to write a code for reverse of string without using string functions?
What is bubble sort in c?
What does a pointer variable always consist of?
Do you know the difference between malloc() and calloc() function?
is it possible to create your own header files?
Do you know the difference between exit() and _exit() function in c?
How are variables declared in c?