Linux下编译运行C命令

2014-11-24 08:32:23 · 作者: · 浏览: 2

#include



int main() {
int i;
scanf("%d",&i);
printf("%d\n",i);


}


一个名为hello.c的文件


打开终端:ctrl+alt+t


输入cd 所在文件夹


gcc -ohello hello.c回车


./hello 回车


到这里就结束了。