gets is unquestionably the worst function in the Standard C Library. It is so unutterably bad that increasing numbers of compilers and linkers have begun issuing sternly-worded warning messages whenever a program calls it at all. (The compilers and linkers couldn't get away with this if the function had any redeeming qualities whatsoever.)

gets is responsible for a great number of the buffer overrun hacks out there. If you use gets in a program, and if the program ever actually gets used for anything, some 16 year old script kiddie will figure out a way to exploit the hole and subvert the program into doing something drastically unintended. (Some of you are saying, "No, no, script kiddies are the ones who don't know anything about programming and can only make use of exploits generated by others", but my point is that exploiting a buffer overrun is, to judge from the number of new exploits being reported every day, evidently such a well-understood, textbook problem by now that even a script kiddie can do it.)

gets. Just Say No.