Why didn’t gcc (or glibc) implement _s functions?

The _s functions are optional (Annex K of the C11 standard). They’re widely regarded as ‘not very beneficial’. In the answers to my question Do you use the TR-24731 “safe” functions?, you can find information about where there are problems with the standard specification — such as crucial differences between the standard and Microsoft’s implementation. … Read more

Difference between scanf and scanf_s

It is a function that belongs specifically to the Microsoft compiler. scanf originally just reads whatever console input you type and assign it to a type of variable. If you have an array called first_name[5] and you use scanf for “Alex”, there is no problem. If you have the same array and assign “Alexander”, you … Read more