time
time 1.소스 #include #include #define SIZE 256 int main( int argc , char ** argv ) { char buf[256]; struct tm *loctime; time_t curtime = time(NULL); loctime = localtime(&curtime); fputs( asctime(loctime ) , stdout ); strftime(buf, SIZE , "today is %A, %B %d \n", loctime ); fputs( buf , stdout ); strftime(buf, SIZE, "the time is %I:%M %p \n", loctime ); fputs( buf , stdout); return 0; } 결과 hacker@u..
2016. 8. 3.