Mac OS上用命令行执行C程序
用命令行新建C文件
1 | touch hello.c |
编辑C文件
1 | vim hello.c |
编写C程序代码
1 | #include <stdio.h> |

编译C程序文件
1 | cc -c hello.c |

生成可执行文件
1 | cc hello.o |

执行文件
1 | ./a.out |

All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.
1 | touch hello.c |
1 | vim hello.c |
1 | #include <stdio.h> |

1 | cc -c hello.c |

1 | cc hello.o |

1 | ./a.out |
