我的微信
运营不易,
感谢支持!
题目:时间函数举例1
程序分析:无。
#include <stdio.h> #include <time.h> int main () { time_t rawtime; struct tm * timeinfo; time ( &rawtime ); timeinfo = localtime ( &rawtime ); printf ( "当前本地时间为: %s", asctime (timeinfo) ); return 0; }
以上实例运行输出结果为:
当前本地时间为: Tue Nov 10 16:28:49 2015