What are the best methods?
Overflowing is by the standard, undefined - incrementing the variable until it becomes negative; and then seting it one position back. So we don't want that.
So that leaves us with only one option - using sizeof() operator and then calculating pow(2, sizeof() - 1) - 1?
Any other alternatives?