Why is the gets function so dangerous that it should not be used?
In order to use gets safely, you have to know exactly how many characters you will be reading, so that you can make your buffer large enough. You will only know that if you know exactly what data you will be reading. Instead of using gets, you want to use fgets, which has the signature (fgets, if it reads … Read more