What happens if statement is closed by semicolon like if(); in c language | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 1

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

I check it it stop after the semicolon.

7th Apr 2019, 3:40 PM
Gurunam Singh panwar
Gurunam Singh panwar - avatar
1 ответ
+ 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"); }
7th Apr 2019, 3:55 PM
Anna
Anna - avatar