Google Interview Question

Write a C function to count the number of bits set in a bit vector.