C programming tutorial 笔记

tutorial 3


使用linux系统运行c,

安装gcc,为compiler,使用vim等工具写好hello world程序,命名hello.c

#include <stdio.h>

int main(){
  printf("hello world!\n"); // \n means a new line
  return 0; //the program worked as expected  
}

之后在terminal中输入:gcc hello.c,之后会自动生成a.out文件,然后输入 ./a.out 运行

参考内容:


C Programming Tutorials

猜你喜欢

转载自www.cnblogs.com/hardi/p/9780260.html