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
hi to every one .. how to view table pool after creating the pooled table? plz help me.. if any knows abt this ..
How do you override a defined macro?
Explain pointers in c programming?
Can the curly brackets { } be used to enclose a single line of code?
How do you declare a variable that will hold string values?
How can you determine the maximum value that a numeric variable can hold?
Explain about the constants which help in debugging?
Describe dynamic data structure in c programming language?
What are integer variable, floating-point variable and character variable?
What is NULL pointer?
What are the advantages and disadvantages of pointers?
What is use of pointer?
What type is sizeof?
What header files do I need in order to define the standard library functions I use?
Can the “if” function be used in comparing strings?