- #include<stdio.h> //预处理器命令
- int main(void){
- int n1,n2,n3;
- n1 = 5;
- n2 = n1 * n1;
- n3 = n1 * n1 * n1;
- printf("%d\n%d\n%d\n",n1,n2,n3);
- getchar();
- return 0;
- }
- #include<stdio.h>,相当于在该行中键入stdio.h文件的完整内容,这利于共享公用的信息。
- #include是预处理指令,编译器在编译前要执行预处理器指令。
- #include尖括号中的文件也成为头文件,包含了输入输出的信息以供编译器和链接器使用,头文件可以用来定义常量、说明函数的使用(函数原型),但是函数的实际代码包是包含在库文件中的,而不在头文件中。
转载于:https://blog.51cto.com/fanaticssk/823123