I changed the malloc back to MAXNAME and that didn't help out at all. The below is still the same result. My understanding is the malloc simply allocates memory on the heap to be able to use so it shouldn't matter other than the amount of memory I am allocating whether or not I use MAXNAME (which is equal to 20) or company (which is equal to 112). As long as there is enough memory to hold the requests, isn't that correct?
char *storage; // Create a storage container to store the answer from the user in fgets.storage=malloc(sizeof(MAXNAME)); // Allocate memory for the pointer just created with malloc// And have a string "storage" of size MAXNAME, orcompany *storage; // Create a storage container to store the answer from the user in fgets.storage=malloc(sizeof(company)); // Allocate memory for the pointer just created with malloc// And go through making sure that you are writing to the correct members in the structure.
What is the 1st employees first name? Kammiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii iiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
What is Kammiiiiiiiiiiiiiii's last name? How old is Kammiiiiiiiiiiiiiii iiiiiiiiiiiiiiiiiii? What is iii's hourly wage? $What is the date of hire for iii (ie. 04-20-1975)? When was the last pay raise date for iii (ie. 04-20-1975)? What is the home phone for iii (ie. 555-555-5555)?