Qualcomm Interview Question

Write a routine to count the number of set bits in an integer