Social Icons

Friday 3 May 2013

Time Using Localtime Function


#include<unistd.h>
#include<time.h>
#include<stdio.h>
int main()
{
time_t t1,t2;
struct tm *tm_ptr;
int m,p,u;
char *n;
time(&t1);

tm_ptr=localtime(&t1);


printf("\n year %2d  : mon %2d    hour  %2d, Minute %2d , Second %2d",tm_ptr->tm_year+1900,tm_ptr->tm_mon+1,tm_ptr->tm_hour,tm_ptr->tm_min,tm_$
return 0;
}

No comments:

Post a Comment

 

Sample Text

Sample text

 
Just Programming Cse DriveReputation Management