0
Why the function gets() in C more appropriate than fgets() to handle strings?
A question of a Sololearn challenge asked which function was better to get strings, and the correct answer was get() but in the options was fgets() too. The C tutorial explains both functions but suggested that fgets is safer than get() to handle strings, so I get a little bit confused.
2 Antworten
+ 2
I think the quiz may be faulty; most of us know `gets` is rather "unsafe" and `fgets` or `scanf` can be used in its place.