linux下的第一个C程序及其编译方法

#include <stdio.h>
#include <stdlib.h>
 
int main(int argc, char ** argv)
{
    printf("hello world! ");
 
    exit(0);
}
 
编译、链接和运行
gcc -o hello hello.c
./hello
 
另外一种编译方法
在源程序所在的目录输入:make hello
这种方式实际上使用了make的自动推导功能,最终使用的命令为:cc     hello.c   -o hello
原文地址:https://www.cnblogs.com/babyha/p/5201376.html