Vidyalelo
C Programming · Q234

Standard Library Functions

Programming · C Programming · question 234

Q234

What will be the output of the following C code if the system date is 6/2/2017 (Friday)? #include #include int main() struct tm *ptr; time_t t; char str[100]; t = time(NULL); ptr = localtime(&t); strftime(str,100,"%A",ptr); puts(str); return 0;

A.
Error
B.
Fri
C.
Friday
Answer
D.
6

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board