在ubuntu上编写第一个C程序"Hello world!"

1.首先,ubuntu有自带的编译器gcc,直接运行即可

2.用sudo apt-get install vim命令安装vim

在这里插入图片描述

3.直接创建并打开一个.c文件在这里插入图片描述

4.编写代码,然后退出

在这里插入图片描述

5.通过“gcc helloworld.c -o helloworld”命令编译

在这里插入图片描述

6.然后通过“./helloworld”命令执行,就可以输出helloworld了

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_27885507/article/details/86619255