How can I get the system time , is it in time.h
is there a way to get the date
thanx
How can I get the system time , is it in time.h
is there a way to get the date
thanx
> is it in time.h
like ctime() and strftime() perhaps
Most functions in the standard .h files have an associated manual page.
Reading a .h file, and skimming the manual pages would be a good idea. You won't remember the detail, but you will remember seeing something, and know roughly where to start looking for the detail when you next need it.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
Try this:
Code:#include <time.h> #include <stdio.h> void main( void ) { time_t ltime; time( <ime ); printf( "The time is %s\n", ctime( <ime ) ); }