count number of 1 bits

Multiple choice question

What will this function return? Does it work for negative numbers?

int myFunc(int num){
  int ret;
  for (ret=0 ; num!=0 ; num&=(num-1))
   ret++;
  return ret;
}
wrong

Count of "1" bits in the number. It will not work for negative numbers

correct

Count of "1" bits in the number. It will work for negative numbers

wrong

Count of bits till the first 1 bit from left. It will not work for negative numbers

wrong

Count of bits till the first 1 bit from left. It will work for negative numbers

wrong

Count of bits till the first 1 bit from right. It will not work for negative numbers

wrong

Count of bits till the first 1 bit from right. It will work for negative numbers