操作环境:CentOS release 6.4 (Final)
新建文件helloworld.c,编辑保存如下内容:
#include<stdio.h>
int main()
{
printf("hello world!\n");
return 0;
}
编译文件helloworld.c
gcc helloworld.c -o helloworld
执行查看效果
[root@mail temp]# ./helloworld
hello world!