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