Sometimes I see (often beginner) code that uses gets()
, a function you should never use for any reason. The function was so bad that it is was even removed from the C Standard at some point.
But as for beginner code, why would their instructors be teaching them that using gets()
was a good idea? And as for non-beginner code, why would any programmer have used it in the first place?
If gets()
is so bad, why was it ever used at any point?