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
Explain what are the __date__ and __time__ preprocessor commands?
What is openmp in c?
What is wrong with this statement? Myname = 'robin';
process by which one bit patten in to another by bit wise operation is? (a) masking, (b) pruning, (c) biting, (d) chopping,
Write a program to check armstrong number in c?
What is formal argument?
What is c definition?
Write a code to generate divisors of an integer?
what is the format specifier for printing a pointer value?
Can we initialize extern variable in c?
Write a function which takes as parameters one regular expression(only ? and * are the special characters) and a string and returns whether the string matched the regular expression.
What are the different types of errors?
What does the c in ctime mean?
What is an array in c?
Explain what are global variables and explain how do you declare them?