For example, this way:
#include <time.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
void main()
{
char stb[1025];
char ste[1025];
char sh[3],sm[3];
tm rtb,rte;
time_t ttb,tte,ttr;
long qh,qm;
printf("Enter Time-in: ");scanf("%s",stb);
printf("Enter Time-out: ");scanf("%s",ste);
rtb.tm_year=111;rtb.tm_mon=0;rtb.tm_mday=1;rtb.tm_sec=0;
strncpy(sh,stb,2);sh[2]='\0';
strncpy(sm,stb+3,2);sm[2]='\0';
rtb.tm_hour=atoi(sh);
rtb.tm_min=atoi(sm);
rte.tm_year=111;rte.tm_mon=0;rte.tm_mday=1;rte.tm_sec=0;
strncpy(sh,ste,2);sh[2]='\0';
strncpy(sm,ste+3,2);sm[2]='\0';
rte.tm_hour=atoi(sh);
rte.tm_min=atoi(sm);
ttb=mktime(&rtb);
tte=mktime(&rte);
ttr=difftime(tte,ttb);
qm=ttr/60;
qh=qm/60;
if(qh)
qm=qm%(qh*60);
printf("Total No. of Working Hours: %02d:%02d\n",qh,qm);
}