[cs631apue] reading from stdin

Jan Schaumann jschauma at stevens.edu
Fri Dec 2 22:22:42 EST 2016


kthompso <kthompso at stevens.edu> wrote:
> > Should we use fgets to read from stdin or will the read system be okay?
> 
> I would not use fgets(3) to read in the data.  From the documentation:

I see nothing wrong with using fgets(3), although nowadays getline(3)
might be more convenient.

-Jan


More information about the cs631apue mailing list