printf("\afile open failed.\n");else{ fprintf(fp,"%d %d %d %d %d %d\n", timer -> tm_year +1900, timer -> tm_mon +1, timer ->tm_mday, timer-> tm_hour, timer -> tm_min, timer -> tm_sec);//将程序运行的时间写入到文件datatime.dat中fclose(fp); } }intmain(void) { p...