Semicolon at the ends of if-statements and functions in C

后端 未结 7 949
猫巷女王i
猫巷女王i 2020-12-20 11:11

I just ran into some code that overuse semicolons, or use semicolon for different purposes that I am not aware of.

I found semicolons at the end of if-statements and

7条回答
  •  借酒劲吻你
    2020-12-20 12:07

    You are right, the compiler considers them empty statements. They are not needed, I guess the programmer somehow thought they were.

提交回复
热议问题