Pergunta de entrevista da empresa KLA

Write a function in C that accepts a byte and returns how many ones there are in one byte.