下载 vim 编辑器
[root@localhost CentOS]# yum install vim
下载 C 语言解析器
[root@localhost CentOS]# yum install gcc
创建 C 语言文档 : vim 文档名
点击 A,a,I,i,O,o 键进入插入模式
[root@localhost CentOS]# vim test.c
代码完成 点击 "ESC " 后 点击 " :" 在终端 写入 "wq" 退出
程序插入完成之后需要进行解析:gcc -o 文件名
gcc –o test test.c,将test.c连接成可执行的二进制文件test
[root@localhost CentOS]# gcc -o test test.c
运行程序 : ./test
[root@localhost CentOS]# ./test
总用量 16 drwxr-xr-x. 2 CentOS 6 11月 4 17:54 桌面 drwxr-xr-x. 2 CentOS 6 11月 4 17:54 音乐 drwxr-xr-x. 2 CentOS 6 11月 4 17:54 下载 drwxr-xr-x. 2 CentOS 6 11月 4 17:54 文档 drwxr-xr-x. 2 CentOS 6 11月 4 17:54 图片 drwxr-xr-x. 2 CentOS 6 11月 4 17:54 视频 drwxr-xr-x. 2 CentOS 6 11月 4 17:54 模板 drwxr-xr-x. 2 CentOS 6 11月 4 17:54 公共 -rw-r--r--. 1 root 390 11月 4 18:52 test.c -rwxr-xr-x. 1 root 8560 11月 4 18:53 test ls completed !



