Implement a function readEmpFromFile that takes a FILE * as the only argument and returns a pointer to a struct employee. This function should read the information from the file (reversing what writeEmpToFile does), create a new employee and fill in the data. If the FILE has no more info (is at end of file), this function should return NULL. This function must also ensure any employee actually created (not the NULL) is added to the array (as is done in createEmployee). Change main to load employees from a file if a command line argument is given to the program (using your readEmpFromFile function you just wrote). Below in the link I have provided is the code that I have so far that is needed to solve the question in the above text the answers to the above text are supposed to function with the code in the link below Like to full code for reference may not need https://onlinegdb.com/jYuB3gpCx
Implement a function readEmpFromFile that takes a FILE * as the only argument and returns a pointer to a struct employee. This function should read the information from the file (reversing what writeEmpToFile does), create a new employee and fill in the data. If the FILE has no more info (is at end of file), this function should return NULL. This function must also ensure any employee actually created (not the NULL) is added to the array (as is done in createEmployee).
Change main to load employees from a file if a command line argument is given to the program (using your readEmpFromFile function you just wrote).
Below in the link I have provided is the code that I have so far that is needed to solve the question in the above text the answers to the above text are supposed to function with the code in the link below
Like to full code for reference may not need
https://onlinegdb.com/jYuB3gpCx
Step by step
Solved in 4 steps