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删除。