gets() is bad.This tip submitted by Sean on 2004-12-28 00:00:00. It has been viewed 40718 times.
Rating of 5.8 with 268 votes
Using the gets() function in the C header stdio.h can cause a variety of unwanted side-effects (including buffer overflows). Instead, use fgets(), and specify stdin as the file pointer.
Help your fellow programmers! Add a tip!