Node:String output and input, Next:Single-character input and output, Previous:High-level file routines, Up:Input and output
We will now examine some high-level file functions for reading strings
from and writing strings to streams. The two string output methods we
will examine (
fputs) are very safe to use, but
the input methods run from the antiquated and very dangerous
to the safer
GNU-specific extensions to the C language that are extremely safe to
It is important to use the safer and better GNU functions when you can.
However, you will probably still want to learn how to read and
understand older (but still free) code that is unsafe (perhaps to update
it and make it safe), so this book describes functions like
despite the fact that they are unsafe.