共计 146 个字符,预计需要花费 1 分钟才能阅读完成。
用命令行新建 C 文件
touch hello.c
编辑 C 文件
vim hello.c
编写 C 程序代码
#include <stdio.h>
int main()
{printf("Hello World!");
return 0;
}
编译 C 程序文件
cc -c hello.c
生成可执行文件
cc hello.o
执行文件
./a.out
正文完
共计 146 个字符,预计需要花费 1 分钟才能阅读完成。
touch hello.c
vim hello.c
#include <stdio.h>
int main()
{printf("Hello World!");
return 0;
}
cc -c hello.c
cc hello.o
./a.out