How do you limit the number of letters you scanf in a string?

后端 未结 0 1519
野趣味
野趣味 2020-12-17 21:05

Let\'s say I got a string with the size of ten. how can I prevent an overflow when I scanf a string from the user? (i.e. if he types "hello world!!" , it would ju

相关标签:
回答
  • 消灭零回复
提交回复
热议问题