my codes below:
#include <stdio.h>
#include <time.h>
int main(int argc, const char * argv[]) {
long secondsSince1970 = time(NULL);
printf("it has been %ld seconds since 1970\n",secondsSince1970);
struct tm now;
long newtime;
localtime_r(&newtime, &now);
printf("the time is %d:%d:%d\n",now.tm_hour,now.tm_min,now.tm_sec);
printf("%ld\n",newtime);
// insert code here...
printf("Hello, World!\n");
return 0;
}
run answer below:
it has been 1465129475 seconds since 1970
the time is 1:41:28
140734799804488
Hello, World!
Program ended with exit code: 0
the question confuse me, is that whenever I run this codes, the time"1:41:28" and the number “140734799804488” can not be changed. Why???