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

Popular posts from this blog

Using Android Volley to post an array to PHP -

python - How to add an model instance to a django queryset? -

angularjs - No 'Access-Control-Allow-Origin' error from local domain to public API -