Code:
/* Main used to TEST functions. */
void main (void)
{
personal employee[15]=
{
{0,{"Mikhil"},{"Peter"},male,125000,{10,10,1987},
{{"6 Lisa Lane"},{"Acton"},{"MA"},{"01720"}}},
{1,{"Sanchez"},{"Ray"},male,15000,{10,15,1964},
{{"4 Foster Lane"},{"Boston"},{"MA"},{"01766"}}},
{2,{"Filmore"},{"Claire"},female,35000,{10,11,1981},
{{"8 Hayword Road"},{"Concord"},{"MA"},{"01777"}}},
{3,{"Marshal"},{"Megan"},female,45000,{10,15,1989},
{{"2 Chapel Road"},{"Boxborough"},{"MA"},{"01654"}}},
{4,{"Hartwick"},{"Ryan"},male,34000,{10,14,1957},
{{"6 Short Road"},{"Bolton"},{"MA"},{"01729"}}},
};
/*****************************************************************/
/*LOOKUP*/
char name[25];
int entry_number;
int entries = 5;
int look_up(personal employee[], char empsearch[], int entries);
printf(" Enter Last name of Employee: ");
scanf ("%9s", name);
entry_number = look_up(employee, name, entries);
if (entry_number != -1)
printf ("%s\n",employee[entry_number].F_name);
else
printf("Sorry, that employee doesn't work here!\n");
/****************************************************************/
}
and the function...