What are the C functions from the standard library that must / should be avoided ?

Posted by nomemory on Stack Overflow See other posts from Stack Overflow or by nomemory
Published on 2010-04-02T08:23:54Z Indexed on 2010/04/02 8:33 UTC
Read the original article Hit count: 258

Filed under:
|
|

I've read on stackoverflow that some C functions are 'obsolete' or should be 'avoided'. Can you please give me some examples of this kind of functions + the reason why.

Later edit: From the answers:

  • gets : can cause buffer overflows.
  • strtok : is not thread safe (Question: Are C functions thread-safe anyways ?)

© Stack Overflow or respective owner

Related posts about c

    Related posts about standard-library