# c_gcc **Repository Path**: Jimmyprince/c_gcc ## Basic Information - **Project Name**: c_gcc - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-07-06 - **Last Updated**: 2021-07-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # c_gcc gcc题解 ①用 vi 编辑一文件 test.c,其内容如下: ``` #include int main() { int s=0,i; for(i=1;i<=15;i++) { s=s+i; printf(“the value of s is %d \n”,s); } return 0; } ``` ②使用 gcc –o test.o test.c 编译,生成 test.o。 ③使用 gcc –g –o test1.o test.c 编译,生成 test1.o。 ④比较 test.o 和 test1.o 文件的大小,思考为什么? (3)使用 GDB 调试上面的程序。 ①带调试参数-g 进行编译。 #gcc –g test.c –o test ②启动 GDB 调试,开始调试。 #gdb Gtest ③使用 gdb 的命令进行调试。 (4)编写一个程序,将系统时间以“year-month-day hour:minute:second”格式 保存在 time.txt 文件中。