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
define string ?
write a program to print the consecutive repeated character from the given string... input string is : hhhhjkutskkkkkggggj output should be like this: hhhhkkkkkgggg anyone help me...
main use of recursive function a) processing speed high b) reduce program length/reduce repeated statements c) if you do not, use iterative methods like, for, while or do-while d) all the above
Explain how can you tell whether a program was compiled using c versus c++?
Write programs for String Reversal & Palindrome check
Write a program to reverse a linked list in c.
What is storage class?
What is %s and %d in c?
Why is c still so popular?
Explain function?
Can we change the value of #define in c?
What is the use of header?
What language is c written?
How can I find out the size of a file, prior to reading it in?
what is a function method?give example?