QUESTION
You have to find the address and mobile number of the employee in the company you have to go through employee details register and find his/her mobile number
ANSWER
#include <stdio.h>
int main()
{
int i,n,fl=0;
struct hom
{
char a[20];
long int ph;
char pl[20];
}hom[20];
char f[20];
scanf("%d",&n);
for(i=1;i<=n;i++)
scanf("%s\n%ld\n%s\n",hom[i].a,&hom[i].ph,hom[i].pl);
scanf("\n%s",f);
for(i=1;i<=n;i++)
if(strcmp(f,hom[i].a)==0)
{
printf("Name Mobile Number City\n");
printf("%s %ld %s",hom[i].a,hom[i].ph,hom[i].pl);
fl=1;
}
if(fl==0)
printf("The Entered Name is not in the Directory");
return 0;
}