Programing - C/C Basic grammar

131 미국식 날짜및 시간( asctime )

junmoyo 2018. 5. 13. 20:28

개념 : 


1. 원형 : char* asctime(const struct tm *timeptr)


소스코드 : 


#include<stdio.h>

#include<time.h>


int main(void)

{

time_t now;

struct tm t;


now = time(NULL);

t = *localtime(&now);

puts(asctime(&t));


system("pause");

return 0;

}



결과: