/* Structure declaration */
struct employee
{
float salary; // here you do not need an array
char doh[20]; // date of hire
char name[20];
char dept[20];
char job[20];
};
printf("\n\t %s was hired on %s and is being paid %d hr.\n \ // <= here you use %d for a float
They are employed as a %s in the %s dept.",
our_employee[1].name, our_employee[1].doh, our_employee[1].salary, our_employee[1].job,
our_employee[1].dept );
This is my printf-line:
printf("\n\t %s was hired on %s and is being paid %5.2f hr.\n \
They are employed as a %s in the %s dept.",
our_employee[1].name, our_employee[1].doh, our_employee[1].salary, our_employee[1].job,
our_employee[1].dept );
If you have an array for salary and use %d you print out the address of the array.