关于猜数字问题的探讨
2012-08-13 16:51
246 查看
Here is the code.
For the details of Date and Time in C, please refer to 21 Date and Time
in The GNU C Library Reference Manual
.
#include <time.h> #include <stdio.h> #define TIME_SIZE 20 int main() { char buffer[TIME_SIZE]; time_t curtime = time(NULL); struct tm* loctime = localtime(&curtime); strftime(buffer, TIME_SIZE, "%4Y/%2m/%2d %2H-%2M-%2S ", loctime); buffer[TIME_SIZE] = 0; printf("The current time is %s\n", buffer); }
For the details of Date and Time in C, please refer to 21 Date and Time
in The GNU C Library Reference Manual
.
相关文章推荐
- 关于数字运算符值得注意的一点小问题
- 字符集问题的初步探讨(七)----关于字符集更改的内部操作
- 关于jQuery中.attr()和.prop()的问题探讨
- 关于监听联系人变化的问题与解决方法探讨
- 关于静态变量“赋值无效问题”的探讨结果
- 关于Objective-C 对象release操作的一个小问题探讨
- 探讨:博友关于“银行股十年十倍”的几个问题(二)
- 关于Textview maxline=1 ellipsize="end" 导致中英文数字混合分割错误的问题
- 关于http协议接受解析中出现陌明奇妙的数字问题
- 关于数组的问题(连续子数组的最大和、数组中出现次数超过一半的数字、调整数组顺序使奇数位于偶数之前)
- 关于有功 无功 感性 容性 母线电压一系列问题的探讨
- 数字电路中关于IO口驱动能力的几个问题
- 探讨:关于动态编译WebService为dll然后调用WebService的问题,无法返回xml文本
- extjs关于treePanel+chekBox全部选中以及清空选中问题探讨
- C语言中关于取三位数的各各位数的单个数字问题
- 关于无缝空间数据库若干问题的探讨
- 关于jQuery判断元素是否存在的问题示例探讨
- 关于PHP写APP接口的安全问题探讨
- 探讨一下关于在线播放阻止用户下载你的MP3的问题
- 关于几个常见的css字体设定问题探讨