#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,"%I",ptr);
puts(str);
return 0;
}
a) 13
b) 01
c) 1
d) error
What will be the output of the following C code if the system time is 1:52 PM (Sunday)?
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
What will be the output of the following C code if the system time is 1:52 PM (Sunday)?
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!