Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C Programming
Qry : Behaviour of fgets -- ?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Charlie Gordon, post: 3056037"] I gave the rationale for this: if the savvy 1% programmers who know well keep using it even just for this purpose, the 99% remaining will continue thinking they know what it does and use it improperly all the time and produce flawed code everywhere, including life support equipment and aircraft navigation systems. The argument is very much the same against gets and sprintf. Even when dealing with Unix utmp and wtmp structures, it would be better to write explicit code to deal with these error prone structures, such code is quite easy to re-write anyway. How can we defend the need for a function with so little value in the C library when we do not even have strdup? Having strncpy causes thousands of bugs. Not having strdup has the same effect (people will call malloc(strlen(str))) Fixing these 2 would make the language safer. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C Programming
Qry : Behaviour of fgets -- ?
Top