Hi,
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:
#include <stdio.h>
int bitcount(unsigned x)
main()
{
int b;
for (B=0; x!=0; x >>=1)
if (x &01)
btt
return b;
}
When i compile, it keep having this error: declaration syntz error.
Anyone can advise me what's the problem? Thanks