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 does it mean when a pointer is used in an if statement?
hello freinds next week my interview in reliance,nybody has an idea about it intervew questions..so tell
Which header file is essential for using strcmp function?
What type is sizeof?
What are terms in math?
What does main () mean in c?
Write a program to check whether a number is prime or not using c?
Difference between Shallow copy and Deep copy?
how can i access hard disk address(physical address)? are we access hard disk by using far,near or huge pointer? if yes then please explain.....
Why do we use null pointer?
What is conio h in c?
Given a valid 24 hour format time find the combination of the value and write a program ,do not hard the value and if any other inputs provided should work with the logic implemented Input: 11:30 Output: 13:10 Input: 18:25 Output: 21:58
How main function is called in c?
Apart from dennis ritchie who the other person who contributed in design of c language.
C program to find all possible outcomes of a dice?