C程序主要包括以下部分:
- 预处理器指令
- 函数
- 变量
- 语句&表达式
- 注释
// 程序的第一行#include <stdio.h>是预处理器指令,告诉C编译器在实际编译之前要包含stdio.h文件
#include <stdio.h>
// int main()是主函数,程序从这里执行
int main(void)
{
// /**/将会被编译器忽略,这里放置程序的内容,它们被称为程序的注释
/*我的第一个C程序*/
// printf(...)是 C中另一个可用的函数,会在屏幕上显示消息"Hello,World"
printf("Hello,World!\n");
// return 0;终止main()函数,并返回值0
// system("pause"); //暂停函数,在#include <stdlib.h>文件里
return 0;
}