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...

write a program to find out number of on bits in a number?

Answer Posted / anilkumar

int n ; \\any number
for(count=0;n&=(n-1); count++);
printf("%d", count);

Is This Answer Correct ?    11 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is realloc in c?

1018


What functions are in conio h?

1151


What is difference between scanf and gets?

1169


What is call by value in c?

953


What is logical error?

1064


What is the best organizational structure?

1067


what is use of malloc and calloc?

1848


Can you please explain the difference between malloc() and calloc() function?

1050


What are the types of unary operators?

1128


How can I dynamically allocate arrays?

1037


What is meant by errors and debugging?

1056


What is the use of ?

994


What is wrong with this declaration?

1046


What is the use of #define preprocessor in c?

1025


Explain how do you convert strings to numbers in c?

1022