10.3.2  单模块程序

更新于 2026年10月13日 版权声明
10.3.2 单模块程序

编写一个程序test.c:

图示

编译该程序:

$gcc test.c

$ls

a.out test.c

默认生成可执行文件a.out,执行该文件:

$./a.out(https://www.daowen.com)

Hello!

指定生成可执行文件名的编译:

$gcc -o test test.c

$ls

test test.c

执行该程序:

$./test

Hello!

✍AI写作