Use bitwise operators for boolean conditions
For example:
if(a||b) /* do something */
This saves one byte:
if(a|b) /* do something */
Respectively, a!=b
becomes a^b
and a&&b
becomes a&b
An example of using this trick.
Note that sometimes you have to use ||
. For example:
if(!a)b++
can be written as
a||b++
but
a|b++
doesn't work.