Why is implicit declaration of gets() not allowed in C99? I had referred this question, which was how I came to know about it's deprecation.
Yes, you should use fgets() instead.
fgets()