[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] calling fini
- Subject: [ale] calling fini
- From: ChrisF at computone.com (Chris Fowler)
- Date: Fri, 9 Mar 2001 09:49:00 -0500
Have this interesting problem when running a C program.?? It only happens then I add "char *test" to the code.?? My only goal was to add an 'a' or 'p' to end of output.
output:
14248:??
14248:?? calling fini: /lib/libc.so.6
14248:??
09:53:39
Code
#include <time.h>
void
main(void)
{
?????????????? int hour = 0;
?????????????? int minutes = 0;
?????????????? int seconds = 0;
?????????????? char *test ='\0';
?????????????? time_t *timet;
?????????????? struct tm *buf;
?????????????? time(timet);
?????????????? buf = localtime(timet);
?????????????? hour = buf->tm_hour;
?????????????? minutes = buf->tm_min;
?????????????? seconds = buf->tm_sec;
?????????????? if ( hour > 12 )
?????????????? {
?????????????? ?????????????? hour = hour - 12;
?????????????? }
?????????????? printf("%02d:%02d:%02d\n", hour,minutes,seconds);
}