If the types are identical it will not make a difference (between 10==i and i==10) since the same operator== will be called and the optimizer should chose the most efficient comparison. The only question is whether your compiler treats the constant 10 as a int, long, size_t, etc...
As far as
if (int i==10) {
}
versus
int i=10;
if (10==i) {
}
The former should be preferred.