Pergunta de entrevista da empresa Microsoft

Write a program to count the number of bits that are '1' a 32 bit integer.