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 called c variables?
write a c program in such a way that if we enter the today date the output should be next day's date.
In a switch statement, explain what will happen if a break statement is omitted?
What are near, far and huge pointers?
How many header files are in c?
Why can’t we compare structures?
Does c have an equivalent to pascals with statement?
What are the 32 keywords in c?
What is double pointer?
What is auto keyword in c?
Why pointers are used?
PROGRAM TO WRITE CONTENTS OF 1 FILE IN REVERSE TO ANOTHER FILE,PROGRAM TO COPY 1 FILE TO ANOTHER BY SPECIFYING FILE NAMES AS COMMAND LINE
What are pointers really good for, anyway?
What is the difference between procedural and declarative language?
Is there any data type in c with variable size?