will I get undefined behaviour by not including all 3 variables into every condition?
The behaviour of not including all variables into every condition is not undefined by itself.
Will every unaccounted for condition go into the else statement?
Statement-false (i.e. the statement after the keyword else
) is executed if the condition is false.
what happens if I get rid of the else statement?
The execution continues from the statement after the if statement.
1
solved Does this usage of if statements cause undefined behaviour? [closed]