For this program:
#include <stdio.h>
#include <time.h>
int main ()
{
time_t seconds;
seconds = time(NULL);
printf("Hours since January 1, 1970 = %ld\n", seconds/3600);
return(0);
}
The output is:
Hours since January 1, 1970 = 460587
Now a slightly change in program:
#include <stdio.h>
#include <time.h>
int main ()
{
time_t seconds;
time_t *s;
seconds = time(s);
printf("Hours since January 1, 1970 = %ld\n", seconds/3600);
return(0);
}
The output is:
Hours since January 1, 1970 = 460587
I want to know the difference while using NULL
and *s