Difference between write() and printf()

后端 未结 6 1792
春和景丽
春和景丽 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:49

    System Call's in OS are used in interacting with the OS. E.g. Write() could be used something into the system or into a program.

    While Standard Library functions are program specific, E.g. printf() will print something out but it will only be in GUI/command line and wont effect system.

    Sorry couldnt comment, because i need 50 reputation to comment.

    EDIT: Barmar has good answer

提交回复
热议问题