EMP; E1;E2;E3;
You cannot declare variables as
void
types. The compiler has no way of telling what data you expect them to contain.
And the following line does not mean anything.
EMP; E1;E2;E3;
If you want to declare three variables of type EMP you need something like:
EMP E1, E2, E3;
But you should not be putting one part of the class into each variable. The correct code would be:
EMP E1;
printf("Enter Employee Id");
scanf("%d",&E1.empid);
printf("Enter Employee name: ");
gets(E1.empname);
printf("Enter Employee Salary");
scanf("%ld",&E1.salary);