lesson 12 showtime c
[[lesson_12_showtime_c]] last edit on Aug 18, 2005 7:08 AM by rescued_by_c

[user02@FC4 Lesson12]$ cat -n showtime.c
   1  #include <stdio.h>
   2  #include <time.h>      // For run-time library functions

   3
   4  int main(void)
   5  {
   6     time_t system_time;
   7
   8     system_time = time(NULL);
   9
  10     printf("The current system time is %s\n", ctime(&system_time));
  11
  12     return 0;
  13  }
[user02@FC4 Lesson12]$ gcc -o showtime showtime.c
[user02@FC4 Lesson12]$ ./showtime
The current system time is Tue Aug 9 03:41:16 2005

[user02@FC4 Lesson12]$