i have written one programm in c using structure to enter name and account number of the emplpyee.the programm shows an error which is
filename.c:11 error:expected identifier or "("before"["token..i am not able to get the error...please clearify it.
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
main()
{
struct wipro
{
char name[20];
char accnum[10];
};
struct wipro_employee[5]
{
int i;
char j[8];
for (i = 0;i < 5;i++)
{
printf("enter the name of employee");
gets("employee[i].name");
printf("%accnum");
gets("j");
employee[i].accnum = atoi(j);
}
for (i = 0;i < 5;i++)
{
printf("the name of the employee is %s\n", employee[i].name);
printf("his age is %d\n", employee[i].accnum);
getch();
}
}
}