Page 1 of 1

What will be the output of the following C code if the system date is 8/22/2016?

Posted: Wed Jul 13, 2022 7:56 pm
by answerhappygod
#include<stdio.h>
#include<time.h>
int main()
{
struct tm *ptr;
time_t t;
char str[100];
t = time(NULL);
ptr = localtime(&t);
strftime(str,100,"%B",ptr);
puts(str);
return 0;
}
a) 9
b) August
c) Aug
d) Error