Ubuntu下编译C语言程序(同时给编译生成的文件命名)

1.创建c文件 test.c

touch test.c

2.编写test.c

vim test.c
#include "stdio.h"
int main(){
    printf("Welcom to here!!! \n");
    return 0;    
}

3.编译(注意 -o test表示:生成的执行码名称为test,不然都是默认的a)

gcc -o test test.c

 

posted on 2018-03-13 20:42  小明在线  阅读(233)  评论(0编辑  收藏  举报

导航