get the current system time and print it
2016-02-18 17:26
344 查看
#include <stdio.h>
#include <time.h>
int main(void)
{
time_t timep;
time(&timep);
printf("the current time: %s\n", ctime(&timep));
}
the result:
the current time: Fri Feb 19 17:26:53 2016
#include <time.h>
int main(void)
{
time_t timep;
time(&timep);
printf("the current time: %s\n", ctime(&timep));
}
the result:
the current time: Fri Feb 19 17:26:53 2016
相关文章推荐
- sql:将字符类型字段转换成数字并排序
- 杂项笔记
- Python Paramiko模块安装和使用
- Java IO:网络IO模型
- GIS+=地理信息+云计算技术——SPARK for IntelliJ IDEA 开发环境部署
- JAVA中获取工程路径的方法
- 移动系统表空间文件到asm
- 像QQ空间的Android沉浸式通知栏
- JS字符串的相关方法
- ACM数论之旅1---素数(万事开头难(>_<))
- Mac Mysql忘记密码重置备忘
- java基础(一)
- app-》h5同步身份
- git 学习总结
- hdu 1722Cake(公约数的应用和求法)
- 简单分析一下socket中的bind
- iOS中.pch文件如何使用
- MarshalAs属性指示如何在托管代码和非托管代码之间封送数据。
- HTML5 中的meter 标签的样式设置
- python int与str转换