Question: I was trying to find the order of evaluation inside if clause when more than 2 conditions are specified. I found multiple results to talk about how 2 conditions are evaluated. My questions is when I have something like,

```
it=seqMap.find(a);

if( a !="" && it==seqMap.end() || isEven )
{
//Do something
}

```

I understand that this is not the right way to write code and braces are important but I am trying to understand how this will work, out of curiosity.

Answer: 
The *built-in* boolean operators impose a strict sequencing. They have **shortcut evaluation** where the second argument is not even evaluated if the first one determines the outcome. This is important in cases where evaluation of the second argument could have Undefined Behavior.

User defined boolean operators do not, as a rule, provide shortcut evaluation.

It's possible to emulate the effect but C++ doesn't really support this. C# does.

---

```
A && B || C

```

… is parsed as

```
(A && B) || C

```

… because `&&` effectively has higher **[precedence](http://en.cppreference.com/w/cpp/language/operator_precedence)** than `||`.

However, the C++ grammar is not defined in terms of precedence. Rather it's designed to emulate a precedence, which then appears as an emergent feature of the grammar. And this means that a naïve precedence view in some cases can indicate an incorrect parse, so use precedence reasoning with care.
It will first evaluate

```
 a !="" && it==seqMap.end()

```

If `a !=""` evaluates to false then it will check

```
a !=""|| isEven 

```

Otherwise if `a !=""` evaluates to true then, `it==seqMap.end()` will be evaluated and 
finally the the answer of `a !="" && it==seqMap.end()` will be OR'ed with `isEven`