1.在系統(tǒng)目錄下創(chuàng)建一個名為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.在系統(tǒng)目錄下創(chuàng)建一個名為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