Of course not. || takes two boolean operands and evaluates to true if at least one of them is true.
When converting integers to bool, all non-zero values are converted to true. When doing the reverse, true becomes 1 and false 0.
Therefore the second is equivalent to if (x==1)++x;