#include <stdio.h>
int bitCount(unsigned int n);
int main(void) {
printf ("# 1-bits in base 2 representation of %u = %d, should be 0\n", 0, bitCount (0));
printf ("# 1-bits in base 2 representation of %u = %d, should be 1\n", 1, bitCount (1));
printf ("# 1-bits in base 2 representation of %u = %d, should be 17\n", 2863377066u, bitCount(2863377066u));
printf ("# 1-bits in base 2 representation of %u = %d, should be 1\n", 268435456, bitCount(268435456));
printf ("# 1-bits in base 2 representation of %u = %d, should be 31\n", 4294705151u, bitCount(4294705151u));
return 0;
}
int bitCount(unsigned int n) {
/* your code here */
}
上記の bitcount プログラムをコマンドラインから動作させることにしました
# ./bitcount 17
2
# ./bitcount 255
8
# ./bitcount 10 20
too many arguments!
# ./bitcount
[the same result as from part a]
printf("too many arguments!")
上記を以下に含める必要があると思います
return 0
が、エラーが発生し続けます。誰でもこれで私を助けることができますか?