Social Icons

Friday, 3 May 2013

Time Function Using C program


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

m=t1;
printf("\n time is %d",m);

printf("\n enter your name :");
scanf("%s",n);

time(&t2);

p=t2;
printf("\n time is %d",p);

u=p-m;
printf("\n time taken in writing name is : %d",u);


return 0;
}

No comments:

Post a Comment

 

Sample Text

Sample text

 
Just Programming Cse DriveReputation Management