If you are not using a struct I would not worry about the dynamic mem allocation.
Using the struc declared before
Code:
//declare a pointer to the data type needed
PHONE_RECORD_STRUCT *pPhoneNum;
//malloc the first record
pPhoneNum=(PHONE_RECORD_STRUCT *) malloc( sizeof (PHONE_RECORD_STRUCT) );
//fill in first record, when asked for second record iNumRecords++;
//realloc for next record
// iNumRecords is the number of records
pPhone=(PHONE_RECORD_STRUCT *) realloc( pPhone, sizeof (PHONE_RECORD_STRUCT) * iNumRecords );
//To input record details, iIndex is zero based array reference (0 to iNumRecords-1)
pPhone[iIndex].PhoneNum=lInputBuffer;
sprintf(pPhone[iIndex].SurName,"%s",sInputBuffer);
//ect
But I would not worry about this at the moment.
Use
#define MAX_RECORDS 1000//handy number to define
char InName[MAX_RECORDS][]; //or similar