Why doesn\'t func3 get executed in the program below? After func1, func2 doesn\'t need to get evaluated but for func3, shouldn\'t it?
if (func1() || func2()
You're using the shortcut-operators || and &&. These operators don't execute the rest of the expression, if the result is already defined. For || that means if the first expression is true and for && if the first expression is false.
If you want to execute all parts of the expression use | and & instead, that is not shortcut.