📑前言
本文主要是【Linux】——用gcc编译器运行c程序的文章,如果有什么需要改进的地方还请大佬指出⛺️
🎬作者简介:大家好,我是听风与他🥇
☁️博客首页:CSDN主页听风与他
🌄每日一句:狠狠沉淀,顶峰相见
用gcc编译器运行c程序
1.编辑一个.c文件(以hello.c为例)
vim hello.c
2.在hello.c编写打印hello的c语言代码
#include<stdio.h>
int main(){
printf("hello\n");
}
3.运行程序
[root@localhost ~ ]# gcc -o hello hello.c
[root@localhost ~ ]# ./hello
4.运行结果
hello