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

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -