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 2c dna?

1085


Is it possible to initialize a variable at the time it was declared?

1224


‘ C’ PROGRAME TO SHOW THE TYPE OF TRANGLE BY ACCEPTING IT’S LENGTH .

2884


Explain about the functions strcat() and strcmp()?

1059


What are examples of structures?

1118


Write a program to generate the Fibinocci Series

1243


What is fflush() function?

1141


What are the key features in c programming language?

1077


write a program to print data of 5 five students with structures?

2052


What is a stream?

1153


What does double pointer mean in c?

1191


What is the purpose of clrscr () printf () and getch ()?

1073


What is the best style for code layout in c?

1102


What are categories used for in c?

1104


How many keywords (reserve words) are in c?

1146