When using fgets to read from stdin how do you stop reading from stdin?
COKEDUDE
27
Junior Poster in Training
Recommended Answers
Jump to PostFrom the docs:
The C library function char fgets(char str, int n, FILE *stream) reads a line from the specified stream and stores it into the string pointed to by str. It stops when either (n-1) characters are read, the newline character is read, or the end-of-file is reached, …
All 3 Replies
rproffitt
2,565
"Nothing to see here."
Moderator
COKEDUDE
27
Junior Poster in Training
rproffitt
2,565
"Nothing to see here."
Moderator
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.