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);

}

Comments

Popular posts from this blog

BYTE STUFFING PROGRAM USING C

Rotate a matrix 270 degree AntiClockWise

Finding the length of connected cells of 1's (regions) in an matrix of 1's and 0's