I have got this question: Write function of bitcount() that return the number of bits set to 1 in an unsigned integer.
Here's my try:
int bitcount(unsigned x)
for (B=0; x!=0; x >>=1)
if (x &01)
When i compile, it keep having this error: declaration syntz error.
Anyone can advise me what's the problem? Thanks