vim编写c语言helloworld

vim编写c语言程序helloworld

vim

i    +  Enter(回车)

输入C语言程序

 #include<stdio.h>              
    void main()              
    {                           
        printf("hello word\n");
    }                      

ESC 退出

:wq +程序名字.c

Enter(回车)

ls

会出现一个hello.c的文件

gcc	hello.c -o hello(想要命名的名字)

运行

./hello

posted @ 2022-04-04 17:26  翀翀翀  阅读(569)  评论(0)    收藏  举报