What will be the output of the following C code?
#include<stdio.h>
#include<time.h>
main()
{
struct tm t;
time_t tc;
t.tm_year=2017-1900;
t.tm_mday=25;
t.tm_mon=5;
t.tm_hour=1;
t.tm_min=30;
t.tm_sec=0;
t.tm_isdst=0;
tc=mktime(&t);
printf(ctime(&tc));
}
#include<stdio.h>
#include<time.h>
main()
{
struct tm t;
time_t tc;
t.tm_year=2017-1900;
t.tm_mday=25;
t.tm_mon=5;
t.tm_hour=1;
t.tm_min=30;
t.tm_sec=0;
t.tm_isdst=0;
tc=mktime(&t);
printf(ctime(&tc));
}A. Sun Jun 25 01:30:00 2017
B. Sun June 25 1:30 2017
C. Sun Jun 25 1:30 117
D. Sun June 25 1:30:00 117
Answer: Option A

Join The Discussion