1.在系统目录下创建一个名为a后缀名为 .c的文件
touch a.c
2.打开新建的a.c文件
open a.c
3.把下面的代码粘贴进去
#include <stdio.h>
int main(){
printf("hello world");
}
4.gcc编译a.c文件
gcc a.c 回车
5.打印输入
./a.out
1.在系统目录下创建一个名为a后缀名为 .c的文件
touch a.c
2.打开新建的a.c文件
open a.c
3.把下面的代码粘贴进去
#include <stdio.h>
int main(){
printf("hello world");
}
4.gcc编译a.c文件
gcc a.c 回车
5.打印输入
./a.out
本文标题:Mac下使用gcc输出hello world
本文链接:https://www.haomeiwen.com/subject/snssfctx.html
网友评论