Quote:Original post by Anonymous Poster
But you were not supposed to use any + or - signs.
Oh my apologies, I forgot about the "no - signs" part, and was only remembering the "no + signs" part.
Oh well, if they ever ask "no +s" but don't mention any lack of -s, then I'd do -~val. Flip the bits, then flip the bits and add one. How cool is that, ne? Fully equivalent to ~val * 0xFFFFFFFF, unless you've got a stupid compiler...