Interview Questions and Answers :: Cisco
Home > Experience Archives > Cisco > Interview Question Set 7 > Discussion
6. What does this one do?
int b( int i ) {
static unsigned char n[] = {0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4};
int c = 0;
while( i ) {
c+=n[i&15];
i >>= 4;
}
return c;
}
Answer:
No Discussion on this question yet!
No Discussion on this question yet!