diff options
Diffstat (limited to '2/9.c')
| -rw-r--r-- | 2/9.c | 4 |
1 files changed, 0 insertions, 4 deletions
@@ -1,10 +1,6 @@ #include <stdio.h> /* counts 1-bits in x */ -int bitcount(unsigned x); - -int main(int argc, char *argv[]) { return 0; } - int bitcount(unsigned x) { // Explanation: on a two's complement system, x - 1 is performed by // adding the two's complement of 1 (i.e. 111...1) to x. Adding 1 to |
