Difference between scanf and scanf_s
问题 What is the difference between scanf and scanf_s ? In the university I have been taught and I am using scanf , but at my personal computer Visual Studio keeps sending this warning. error C4996: 'scanf': This function or variable may be unsafe. Consider using scanf_s instead. And I have to change all scanf to scanf_s or the program won't build. (I am using Visual Studio 2013) 回答1: It is a function that belongs specifically to the Microsoft compiler. scanf originally just reads whatever console