Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

hi to every one .. how to view table pool after creating the pooled table? plz help me.. if any knows abt this ..

1868


How do you override a defined macro?

1208


Explain pointers in c programming?

1061


Can the curly brackets { } be used to enclose a single line of code?

1119


How do you declare a variable that will hold string values?

1104


How can you determine the maximum value that a numeric variable can hold?

1149


Explain about the constants which help in debugging?

1307


Describe dynamic data structure in c programming language?

1037


What are integer variable, floating-point variable and character variable?

1182


What is NULL pointer?

1036


What are the advantages and disadvantages of pointers?

1011


What is use of pointer?

1008


What type is sizeof?

992


What header files do I need in order to define the standard library functions I use?

996


Can the “if” function be used in comparing strings?

979