fork(17) download
  1. #include <time.h>
  2. #include <stdio.h>
  3.  
  4. int main(void) {
  5. char buffer[32];
  6. struct tm *ts;
  7. size_t last;
  8. time_t timestamp = time(NULL);
  9.  
  10. ts = localtime(&timestamp);
  11. last = strftime(buffer, 32, "%A", ts);
  12. buffer[last] = '\0';
  13.  
  14. printf("%s\n", buffer);
  15. return 0;
  16. }
  17.  
Success #stdin #stdout 0s 1852KB
stdin
Standard input is empty
stdout
Wednesday