1.终端: vim test.c
2. 按 a 或 i 进入输入模式
3.输入代码 例
#include <stdio.h>
int main()
{
printf("this is Ubuntu.\n");
}
4.执行完后 按 ESC : wq (wq是保存并退出)
5.接着终端中输入 gcc test.c
6.输入 ./a.out
7.终端会输出结果。
1.终端: vim test.c
2. 按 a 或 i 进入输入模式
3.输入代码 例
#include <stdio.h>
int main()
{
printf("this is Ubuntu.\n");
}
4.执行完后 按 ESC : wq (wq是保存并退出)
5.接着终端中输入 gcc test.c
6.输入 ./a.out
7.终端会输出结果。