C - scanf() vs gets() vs fgets()

前端 未结 7 1247
情话喂你
情话喂你 2020-11-22 16:38

I\'ve been doing a fairly easy program of converting a string of Characters (assuming numbers are entered) to an Integer.

After I was done, I noticed some very pecul

相关标签:
7条回答
  • 2020-11-22 17:16

    never use gets(), it can lead to unprdictable overflows. If your string array is of size 1000 and i enter 1001 characters, i can buffer overflow your program.

    0 讨论(0)
提交回复
热议问题