diff --git a/gowrikumar/src/07-countbits.c b/gowrikumar/src/07-countbits.c index 73a72dc..aad54a4 100644 --- a/gowrikumar/src/07-countbits.c +++ b/gowrikumar/src/07-countbits.c @@ -19,7 +19,7 @@ int get_bit_count(unsigned int x) int i; int shift; /* Number of positions to shift to right*/ for (i = 0, shift = 1; i < 5; i++, shift *= 2) { - x = (x & mask[i])+ ((x >> shift) & mask[i]); + x = (x & mask[i]) + ((x >> shift) & mask[i]); } return x; }