是< stdio.h>中的函数。操作系统提供的系统调用??? [英] are the functions in <stdio.h> system calls provided by operation system???

查看:72
本文介绍了是< stdio.h>中的函数。操作系统提供的系统调用???的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

伙计

我有一个问题。是< stdio.h>中的函数。系统调用

由操作系统提供?

如果是这样,我想知道C如何实现我们可以通过

调用系统调用< stdio.h>中的函数。

i需要你的帮助,非常感谢。

解决方案

你好


stdio.h是一个库,所以这些调用是_not_系统调用,他们

是_library_调用。当然库调用是建立在系统

调用之上的。试试这个:


步骤1:将其保存为foo.c并使用gcc foo.c进行编译。


#include< stdio.h> ;


int

main()

{

printf(" Hello comp.lang .c!\ n");


返回0;

}


第2步:运行一个.out并看到这个(


是你的提示):


Hello comp.lang.c!

hi,guy
i have a question. are the functions in <stdio.h> system calls
provided by operation system?
if so, i want to know how C implements that we can call system calls by
using the functions in <stdio.h>.
i need your help, thanks a lot.

解决方案

Hello

stdio.h is a library, and so those call are _not_ system calls, they
are _library_ calls. Of course library calls are built on top of system
calls. Try this:

Step 1: save this as foo.c and compile with gcc foo.c

#include <stdio.h>

int
main ()
{
printf ("Hello comp.lang.c!\n");

return 0;
}

Step 2: run a.out and see this (


is your prompt):


Hello comp.lang.c!


这篇关于是&lt; stdio.h&gt;中的函数。操作系统提供的系统调用???的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆