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

what do you mean by inline function in C?

1058


What are the primitive data types in c?

1082


What are different types of pointers?

1075


Why doesnt long int work?

1048


Why are some ANSI/ISO Standard library routines showing up as undefined, even though I've got an ANSI compiler?

1137


What are the advantages and disadvantages of pointers?

1074


What is pragma in c?

1219


In this problem you are to write a program that will cut some number of prime numbers from the list of prime numbers between 1 and N.Your program will read in a number N; determine the list of prime numbers between 1 and N; and print the C*2 prime numbers from the center of the list if there are an even number of prime numbers or (C*2)-1 prime numbers from the center of the list if there are an odd number of prime numbers in the list.

1855


my project name is adulteration of chille powder.how can i explain it to the hr when he asks me about the project?

1590


Explain modulus operator.

1064


Which of the following operators is incorrect and why? ( >=, <=, <>, ==)

1176


Explain two-dimensional array.

1084


Explain what is the heap?

1059


What are the types of pointers in c?

1029


 write a program that will open the file, count the number of occurences of each word in the the complete works of shakespeare.  You will then tabulate this information in another file.

2226