In C or C++
if ( x )
statement1;
else
statement2;
For what value of x
will both statements be executed?
I know
for what value of x both statements will be executed?
There is no such value: either the value evaluates to true
(something != 0), or it evaluates to false
) (0). No other possible values exist.
I know we can execute if-else together like this: if(1){ goto ELSE; } else{ ELSE: }
That works but it isn’t depending of the value of the if
condition at all.