Function to find the given number is a power of 2 or not?
Answer Posted / ms
int ispow2(int number)
{
if(n<o) {
return 0;
}
else {
return !(number&(number-1));
}
Is This Answer Correct ? | 76 Yes | 13 No |
Post New Answer View All Answers
Why do we use static in c?
Define Array of pointers.
Who developed c language?
I came across some code that puts a (void) cast before each call to printf. Why?
Explain how can type-insensitive macros be created?
What is structure of c program?
Explain the difference between ++u and u++?
What does the error 'Null Pointer Assignment' mean and what causes this error?
how to create duplicate link list using C???
What is pointer to pointer in c?
When reallocating memory if any other pointers point into the same piece of memory do you have to readjust these other pointers or do they get readjusted automatically?
Give differences between - new and malloc() , delete and free() ?
What are the 4 types of unions?
Why do we use c for the speed of light?
Can math operations be performed on a void pointer?