Pergunta de entrevista da empresa Gumstix

Write a C function that takes an integer and returns the number of ones in its binary representation.