How does printf work internally? [duplicate]

给你一囗甜甜゛ 提交于 2019-11-30 17:53:55

I think you're looking at the wrong layer. The logic in vfprintf is responsible for formatting its arguments and writing them through the underlying stdio functions, usually into a buffer in the FILE object it's targetting. The actual logic for getting this output to the file descriptor (or on other non-POSIX-like systems, the underlying device/file representation) is probably in fwrite, fputc, and/or some __-prefixed internal functions (perhaps __overflow).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!