哪些呢的#include&LT;&stdio.h中GT;真正做到在C程序 [英] what does #include <stdio.h> really do in a c program
问题描述
我在C编程一个新的学生,我是编码一些简单的程序Hello World的风格。
I am a new student in c programming and I was coding some simple programs "Hello world" style.
在所有这些节目我把#包括LT&;&stdio.h中GT;
在顶部,但我不知道这是什么意思完全一样。我GOOGLE了它,我发现stdio.h中是具有命令为preprocessor一个文件,但什么是preprocessor?我想,当我写code,我编译它和我的code转变为一种形式,电脑可以读,然后我可以运行它。有人能向我解释这是该命令的用法?
In all of these programs I put #include<stdio.h>
in the top but I am not sure what this means exactly. I googled it and I found that stdio.h is a file that has commands for the preprocessor, but what is preprocessor? I thought that when I write code, I compile it and my code transforms to a form that "computer" can read and then I can run it. Can somebody explain to me which is the usage of this command?
推荐答案
它看起来对 stdio.h中
文件,并有效地复制它粘贴在这个地方的#include
语句。该文件包含的功能,所谓的函数原型,如的printf()
, scanf()的
,...所以该编译器知道什么是他们的参数和返回值。
It looks for the stdio.h
file and effectively copy-pastes it in the place of this #include
statements. This file contains so-called function prototypes of functions such as printf()
, scanf()
, ... so that compiler knows what are their parameters and return values.
这篇关于哪些呢的#include&LT;&stdio.h中GT;真正做到在C程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!