Sunday, November 28, 2010

Define the structure called Employee having properties like emp_id, emp_name, gender, and emp_sal email_add. Write a program which takes the details o

#include

struct Employee
{
int emp_id;
char emp_name[30];
char gender[10];
int emp_sal;
char email_add[50];
};

main()
{
struct Employee d[100];
int i,n;
printf("Enter the Number of Employees Details: ");
scanf("%d",&n);
for(i=0;i {
printf("Enter the ID of Employ:");
scanf("%d",&d[i].emp_id);

printf("Enter the name of the Employ:");
scanf("%s",d[i].emp_name);

printf("Enter the gender:");
scanf("%s",d[i].gender);

printf("Enter the Salory:");
scanf("%d",&d[i].emp_sal);

printf("Enter the Email ID :");
scanf("%s",d[i].email_add);

printf("\n\n");

}
for(i=0;i printf("\n\n\nEmploy's ID-----> %d\nEmploy's Name-----> %s\nEmploy's Gender-------> %s\nEmploy's Salary-------> RS. %d\nEmploy's Email ID-----> %s\n\n",d[i].emp_id,d[i].emp_name,d[i].gender,d[i].emp_sal,d[i].email_add);

}