I have seen this code often
and I am wondering if it would start from left to right guaranteed?Code:if (obj != NULL && obj->var != 0)
{
...
}\
Personally I always write this as
but I am not sure if the above is necessary. I believe that it can start from left or from right depending the compiler, so you have to use multiple ifs. Am I correct?Code:if (obj != NULL)
{
if (obj->var != 0)
{
...
}
}