Why are stdin and stdout considered files in C? -
Why are stdin and stdout considered files in C? -
for example, stdio.h library has functions require file * argument take stdin user input terminal.
c stdio functions operate on streams, not files. far code concerned, stream consumer (output stream) or producer (input stream) of bytes.
a stream may associated file on disk. may associated terminal. or printer. or network socket. or else might want communicate with. stream abstraction of can read or write string of bytes.
stdin , stdout (along stderr) predefined file * objects refer console, although can override either @ command line or within code.
c stdout stdin
Comments
Post a Comment