1.使用vi/vim進行編寫代碼並保存為hello_world.c.如下:
/* This is my first C program*/
#include <stdio.h>
int main(){
printf("Hello World!\n");
return 0;
}
2.使用gcc進行編譯
gcc hello_world.c -o hello_world

3.像執行shell腳本一樣執行
./hello_world

1.使用vi/vim進行編寫代碼並保存為hello_world.c.如下:
/* This is my first C program*/
#include <stdio.h>
int main(){
printf("Hello World!\n");
return 0;
}
2.使用gcc進行編譯
gcc hello_world.c -o hello_world

3.像執行shell腳本一樣執行
./hello_world

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。