美文网首页
C语言入门——Hello world

C语言入门——Hello world

作者: 页面仔小杨 | 来源:发表于2017-08-08 23:39 被阅读0次

1.在终端切换目录至桌面,输入命令:

touch 1-1.c  //创建1-1.c文件

2.编辑器打开1-1.c,或gedit 1-1.c 编写代码

#include<stdio.h>

int main()

{

printf("hello world");

return 0;

}

3.编译代码

gcc -o 1-1 1-1.c

4.运行代码

./1.1

相关文章

网友评论

      本文标题:C语言入门——Hello world

      本文链接:https://www.haomeiwen.com/subject/slfxrxtx.html