C语言中ctime函数功能及用法
2009-10-09 14:58
274 查看
函数名: ctime
功 能: 把日期和时间转换为字符串
用 法: char *ctime(const time_t *time);
程序例:
#include <stdio.h>
#include <time.h>
int main(void)
{
time_t t;
time(&t);
printf("Today's date and time: %s/n", ctime(&t));
return 0;
}
功 能: 把日期和时间转换为字符串
用 法: char *ctime(const time_t *time);
程序例:
#include <stdio.h>
#include <time.h>
int main(void)
{
time_t t;
time(&t);
printf("Today's date and time: %s/n", ctime(&t));
return 0;
}
相关文章推荐
- C语言中mktime函数功能及用法
- C语言中串拷贝函数strcpy功能及用法
- C语言中mktime函数功能及用法
- C语言中mktime函数功能及用法
- C语言中strstr函数功能及用法
- C语言中memcopy函数功能及用法
- C语言中mktime函数功能及用法
- C语言中fread(),fwrite(),fseek()用法和功能
- C语言中strlen函数功能及用法
- C语言::printf()函数功能、原型、用法及实例
- C语言中函数memset(),memcpy()和strchr()的功能和用法
- 功能强大的C语言memset()函数用法
- C语言中atof函数功能及用法
- C语言中time函数功能及用法
- C语言中mktime函数功能及用法
- C语言中localtime函数功能及用法
- C语言中函数memset(),memcpy()和strchr()的功能和用法
- C语言中的continue用法
- Spinner的功能和用法
- ViewSwitcher的功能与用法View