I was thinking this morning here, what would be the fastest way to reverse a number of positive to negative and from negative to positive, of course, the simplest way might
You can try
int a = 10; a= ~a+1;
but you shouldn't worry about that, because compiler makes it in the best way.