1.在終端切換目錄至桌面,輸入命令:
touch 1-1.c ?//創建1-1.c文件
2.編輯器打開1-1.c,或gedit 1-1.c 編寫代碼
#include<stdio.h>
int main()
{
printf("hello world");
return 0;
}
3.編譯代碼
gcc -o 1-1 1-1.c
4.運行代碼
./1.1
1.在終端切換目錄至桌面,輸入命令:
touch 1-1.c ?//創建1-1.c文件
2.編輯器打開1-1.c,或gedit 1-1.c 編寫代碼
#include<stdio.h>
int main()
{
printf("hello world");
return 0;
}
3.編譯代碼
gcc -o 1-1 1-1.c
4.運行代碼
./1.1