Bitwise Operation, Add one to a number without using +
Anonimo
int add (int n) { return n & 1 ? add (n>>1)<<1 : n | 1; } First expression in the ternary operator is carrying the 1 if the last binary digit is one, the second is adding the 1 if the last binary digit is 0