In C or C++
if ( x ) statement1; else statement2;
For what value of x will both statements be executed?
x
I know
In a recursive function both branches can be executed:
void recursive(bool first) { if(first) { recursive(false); } else { //END } }
Invoking it with
recursive(true)
will execute the if branch followed by the else branch