Question d’entretien chez Intel Corporation

write a function to see how many bits are set in an integer.

Réponses aux questions d'entretien

Utilisateur anonyme

1 juil. 2012

while(n>0){ (n&(n-1)) count++; }

Utilisateur anonyme

12 juil. 2011

use bit wise operators. && and shift operators.