Pergunta de entrevista da empresa Qualcomm

Was asked to write a code to count the number of set bits in a 32 bit interger