ctime: 将时间和日期以字符串格式表示头文件: time.h函数定义: char *ctime(const time_t *timep);应用举例:#include <stdio.h>#include <time.h>int main(void){time_t timep;time(&timep);printf("%s", ctime(&timep));return 0;}运行结果:Sun Dec 14 15:30:11 2014