“int main (vooid)”? How does that work?

前端 未结 4 769
迷失自我
迷失自我 2020-12-22 20:31

I recently had to type in a small C test program and, in the process, I made a spelling mistake in the main function by accidentally using vooid instead of

4条回答
  •  悲哀的现实
    2020-12-22 21:33

    In C, the default type for a function argument is int. So, your program is treating the word vooid as int main(int vooid), which is perfectly valid code.

提交回复
热议问题