Check current time using C program
#include<stdio.h>
#include<time.h>
int main()
{
struct tm *local,*gm;
time_t t;
t=time(NULL);
local=localtime(&t);
printf("time-->%d:%d:%d",local->tm_hour,local->tm_min,local->tm_sec);
}
#include<time.h>
int main()
{
struct tm *local,*gm;
time_t t;
t=time(NULL);
local=localtime(&t);
printf("time-->%d:%d:%d",local->tm_hour,local->tm_min,local->tm_sec);
}
Comments
Post a Comment