Vidyalelo
C Programming · Q213

Standard Library Functions

Programming · C Programming · question 213

Q213

What will be the output of the following C code if the system time is 4:27 PM? #include #include int main() struct tm *ptr; time_t t; char str[100]; t = time(NULL); ptr = localtime(&t); strftime(str,100,"%H %p %M minutes",ptr); puts(str); return 0;

A.
16 27 minutes
B.
4 27 minutes
C.
16 PM 27 minutes
Answer
D.
4 PM 27 minutes

Answer: Option C

Solution

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