How does scanf() work inside the OS?

前端 未结 4 819
感情败类
感情败类 2021-02-09 02:46

I\'ve been wondering how scanf()/printf() actually works in the hardware and OS levels. Where does the data flow and what exactly is the OS doing around these times? What calls

4条回答
  •  伪装坚强ぢ
    2021-02-09 03:42

    I think the OS just provides two streams, one for input and the other for output, the streams abstract away how the output data gets presented or where the input data comes from.

    so what scanf & printf are doing are just adding bytes (or consuming bytes) from either streams.

提交回复
热议问题