Mac下运行C程序

转自:https://blog.csdn.net/zhangvalue/article/details/84983836

新建一个.c文件(用来编写代码),输入命令:

 #include<stdio.h>
 int main(){
         printf("hello\n");
          return 0;
  }    

编译,输入命令gcc helloword.c,

运行,输入./a.out helloworld.c运行出结果。

posted @ 2020-09-27 10:08  夏秋初  阅读(180)  评论(0)    收藏  举报