准备工作
系统:Windows 10 专业版
编译器:MinGW编译器
第一个程序
#include <stdio.h>
void main() {
printf("Hello World!");
}
保存为C文件
运行
到文件所在目录依次输入命令
gcc test.c -o test.exe
test.exe
系统:Windows 10 专业版
编译器:MinGW编译器
#include <stdio.h>
void main() {
printf("Hello World!");
}
保存为C文件
到文件所在目录依次输入命令
gcc test.c -o test.exe
test.exe