?
What will be the output of the following C code if the system date is 6/2/2017 (Friday)?
What will be the output of the following C code if the system date is 6/2/2017 (Friday)?
#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,"%A",ptr);
puts(str);
return 0;
}
#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,"%A",ptr);
puts(str);
return 0;
}
Join the Discussion
Login to post a comment or share your explanation.
Login