code_snippets/c_projects/test_char_pointers/time_pg.c

20 lines
377 B
C
Raw Normal View History

2024-10-08 01:16:21 +00:00
/* ctime example */
#include <stdio.h>
#include <stdint.h>
#include <time.h>
int main ()
{
time_t rawtime;
time ( &rawtime );
struct tm *local = localtime(&rawtime);
printf ( "The current local time is: %04d-%02d-%02d\n", local->tm_wday, local->tm_mon + 1, local->tm_mday );
printf ("%d\n", 8*sizeof(int8_t*));
printf ("%d\n", 8*sizeof(int8_t));
return 0;
}