> typedef struct employee Employee[3];
Typedefs which just make an array out of a type, or make a pointer out of a type don't add a lot of value, but add a hell of a lot of confusion.
Without this, your code looks like this
Code:
#include <stdio.h>
struct employee
{
char firstname[40];
char lastname[40];
int id;
};
typedef struct employee Employee;
/* Input the employee data interactively from the keyboard */
void InputEmployeeRecord(Employee *ptrEmployee);
int main() /*!! yes, really, it is int */
{
Employee e1[3];
InputEmployeeRecord(e1);
return 0;
}
void InputEmployeeRecord(Employee *ptrEmployee)
{
int i=0;
for(i=0;i<3;i++)
{
/// input code, not using gets()
}
}