+1

What happens if statement is closed by semicolon like if(); in c language

I check it it stop after the semicolon.

4/7/2019 3:40:20 PM

Gurunam Singh panwar

1 Answer

New 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"); }