For example:
./bit_count 0x123456789abcdef0 bit_count(0x123456789abcdef0) returned 32
What would be an algorithm to count the number of 1-bits in the 64-bit integer value that was passed in to the given function above.
Any help would be much appreciated?
One of approaches is the following
The program output is