helloword.c

helloWord.c

vi helloword.c                      //创建并编辑HelloWord.c  如果helloword.c存在则直接编译

#include<stdio.h>                  //声明标准输入输出函数
main(int argc,char**argv){         //main函数
        printf("helloword\n");     //打印helloword  "\n"换行
        return 0;                  //标志函数结束,返回“0”
}

编辑完成,按Esc 退出到命令模式  输入“:wq”保存退出  输入“:q!”不保存强制退出

猜你喜欢

转载自blog.csdn.net/weixin_42717960/article/details/81088018