linux C(hello world)

时间:2014-07-22 22:43:35   收藏:0   阅读:243

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

bubuko.com,布布扣

3.像执行shell脚本一样执行

 ./hello_world

  bubuko.com,布布扣

linux C(hello world),布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!