In addition to the struct suggestions that have been offered...,
your question also has to do with visibility of data between files (modules).
Here is a great link that will clarify how to create and define information such as a struct in one file (usually a .h), assign values to the struct members and use them in another file (likely a .c) and modify the values in a third file. (likely also a .c).
As for the array of structs; Create it in a header file that will be included by any .c module that will use it. It could look something like:
#define NUM_EMPL 10 //number of employees
typedef struct {
char last[40];
char first[40];
float payrate;
int hours;
float gross;
float tax;
float net;
} EMPLOYEE;
extern EMPLOYEE empl[NUM_EMPL], *pEmpl; //'extern' keyword is used only in this file
Then, in all .c module(s), where this struct will be used, at top of file somewhere (i.e. not inside a function), create a new instance of the struct that is defined in the .h file:
EMPLOYEE empl[NUM_EMPL], *pEmpl; //same as in .h file except without 'extern' keyword
Then, within functions you can either initialize the pointer version of the structure to the beginning of the struct definition, and populate the struct members with values;
void func1(void)
{
Empl = &empl[0]; // '[0]' guarantees pointer location.
//finally assign values
//(can be put into loop or similar to assign all n employess)
strcpy(pEmpl[0].last, "Smith");
strcpy(pEmpl[0].first, "John");
pEmpl[0].payrate = 100.00;
pEmpl[0].hours = 40;
//and so on...
//pass pointer to struct to another function
func2(pEmpl);
}
Or, you receive a pointer to the struct as an argument:
(The following function can be in a different .c file to better demonstrate inter-file visibility of the data.)
void func2(EMPLOYEE *e)
{
// assign values
//(can be put into loop or similar to assign all n employess)
strcpy(e[0].last, pEmpl[0].last);
strcpy(e[0].first, pEmpl[0].first);
e[0].payrate = pEmpl[0].payrate;
e[0].hours = pEmpl[0].hours;
//and so on...
}