ubuntu命令行编C语言

首先在文本编辑器中编写C代码,并将名字保存为hello.c

hello.c

terminal中打开Documents(因为我的hello.c保存在Documents中)

terminal中输入:cc hello.c 编译hello.c

执行文件 :./a.out (在Documents中生成可执行文件,同时也会输出)

terminal

详情链接