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
What is realloc in c?
What functions are in conio h?
What is difference between scanf and gets?
What is call by value in c?
What is logical error?
What is the best organizational structure?
what is use of malloc and calloc?
Can you please explain the difference between malloc() and calloc() function?
What are the types of unary operators?
How can I dynamically allocate arrays?
What is meant by errors and debugging?
What is the use of ?
What is wrong with this declaration?
What is the use of #define preprocessor in c?
Explain how do you convert strings to numbers in c?