What is the most efficient way to count the number of bits which are set in an integer?


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More C Interview Questions

Define C in your own Language.

0 Answers   Motorola,


write a c program to change only the 3rd bit of the particular number such that other bits are not affected.. if bitnum=10(say.. it can be any no..

10 Answers   Bosch, Mind Tree,


The program will first compute the tax you owe based on your income. User is prompted to enter income. Program will compute the total amount of tax owed based on the following: Income Tax 0 - $45,000 = 0.15 x income $45,001 - $90,000 = 6750 + 0.20 x (income – 45000) $90,001 - $140,000 = 15750 + 0.26 x (income – 90000) $140,001 - $200,000 = 28750 + 0.29 x (income – 140000) Greater than $200,000 = 46150 + 0.33 x (income – 200000) Dollar amounts should be in dollars and cents (float point numbers with two decimals shown). Tax is displayed on the screen.

0 Answers   Microsoft,


How is a structure member accessed?

0 Answers  


Where static variables are stored in c?

0 Answers  


What is ctrl c called?

0 Answers  


What are the preprocessor categories?

0 Answers  


What is the function of volatile in c language?

0 Answers  


How many types of sorting are there in c?

0 Answers  


#define MAX 3 main() { printf("MAX = %d ",MAX ); #undef MAX #ifdef MAX printf("Vector Institute”); #endif }

1 Answers  


How can I do graphics in c?

0 Answers  


who is first prime minister in india??

8 Answers   Wipro,


Categories