函數名: 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;
}
函數名: 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;
}