Page 1 of 1

What will be the output of the following C code if it is executed on 2nd January, 2017 (system date)?

Posted: Wed Jul 13, 2022 7:56 pm
by answerhappygod
#include<stdio.h>
#include<time.h>
int main()
{
struct tm *local, *gm;
time_t t;
t=time(NULL);
local=localtime(&t);
printf("%d",local->tm_yday);
return 0;
}
a) 0
b) 1
c) 2
d) Error