1.进入Ubuntu界面

1.1按快捷键 Ctrl + Alt + T;

Ubuntu中敲写c语言步骤

1.2 安装vim:输入 sudo apt-get install vim;

1.3 安装gcc:输入 sudo apt-get install g++。

2.创建文件,敲写代码。

2.1 新建文件名为test.c的源文件:输入vim test.c;

2.2 按i 进入insert模式(即编辑输入模式)

2.3若想要行号,Esc回到normal模式,按:set nu!即可

2.4 输入完成后,Esc 回到normal模式,按:wq 保存退出vim。

3.编译  gcc -o test test.c  

4.运行程序  ./test

相关文章:

  • 2022-12-23
  • 2021-10-11
  • 2022-12-23
  • 2022-12-23
  • 2021-10-21
  • 2021-05-07
  • 2021-08-19
  • 2023-01-08
猜你喜欢
  • 2021-12-15
  • 2022-01-03
  • 2022-12-23
  • 2021-10-24
  • 2022-02-09
  • 2021-09-22
  • 2021-04-02
相关资源
相似解决方案