char buffer; gets(buffer);Hint: what information or argument is the function gets() missing? Should be thinking about array boundaries. The function has no parameter which tells it the size of the buffer, so it cannot possible check array boundaries. It is inherently dangerous. The same thing applies to the C++ operation >>.