c = 5 + (x < 2 || (e < pi));
Let's look at each section of the code inside the outer parentheses in turn.
Since x is equal to 2, x < 2 is false.
Since e is less than pi, this returns true. [By the way, you can use exp(1) to return the value of the constant e.]
This results in true.
So what is 5 + true? For many intents and purposes in MATLAB, you can think of false like 0 and true like 1. Indexing is the main exception; you can't index into an array with 0 but you can with false. [Search the documentation for "logical indexing" for more information on this.] So 5 + true is essentially 5 + 1 which results in 6.