+ 1
What happens if statement is closed by semicolon like if(); in c language
I check it it stop after the semicolon.
1 Answer
+ 3
if(condition);
{
puts("yay");
}
is the same as
if(condition) {
// empty expression, do nothing
}
{
// doesn't belong to the if clause, always executed
puts("yay");
}