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.
Asked
Active
Viewed 98 times
2
-
This [related answer](https://stackoverflow.com/a/4309845/721855) provides alternatives. – aled Aug 11 '20 at 15:48
1 Answers
4
Yes, you should use fgets()
instead.

Sourav Ghosh
- 133,132
- 16
- 183
- 261
-
-
-
1
-
1@User1426833: `fgets` works on *streams* (like almost every other stdio library function), meaning it can work with standard input as well, you just have to specify it explicitly - `fgets( buffer, sizeof buffer, stdin )`. – John Bode Aug 11 '20 at 15:58