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

Study the following C program :call_me (myvar)int myvar;{ myvar +- 5; }main(){int myvar;myvar = 3;call_me(myvar);printf("%d ",myvar);What will be printed a) 3 b) 5 c) 8 d) symbol

1120


What is difference between array and structure in c?

1190


Is null always defined as 0(zero)?

1111


I just typed in this program, and it is acting strangely. Can you see anything wrong with it?

1012


Wt are the Buses in C Language

3215


What is sizeof array in c?

1057


What is difference between static and global variable in c?

1055


Not all reserved words are written in lowercase. TRUE or FALSE?

1233


Do pointers take up memory?

1156


Explain how are 16- and 32-bit numbers stored?

1267


What are the 4 types of programming language?

1129


What is string function in c?

983


What is use of #include in c?

1167


what is diffrence between linear and binary search in array respect to operators?what kind of operator can be used in both seach methods?

1859


how to capitalise first letter of each word in a given string?

1928