Difference between write() and printf()

后端 未结 6 1823
春和景丽
春和景丽 2020-12-09 04:03

Recently I am studying operating system..I just wanna know:

What’s the difference between a system call (like write()) and a standard library function (like printf()

6条回答
  •  星月不相逢
    2020-12-09 04:28

    printf() is one of the APIs or interfaces exposed to user space to call functions from C library.

    printf() actually uses write() system call. The write() system call is actually responsible for sending data to the output.

提交回复
热议问题