by ChristianMarks · 15y ago · 0 comments
int bits(unsigned n) { int i = 0; while (n > 0) { n &= n-1; i++ } return i; }