Define a structure Department with the following members dep…

Define a structure Department with the following members deptID (int), deptName (string). Define another structure Employee with members empID (int), empName (string) and empSalary (float) and department (Department). Write a function struct employee * getEmployeeData(int n) that asks user to enter data for n employees including their department and return an array of n Employees. Write another function void sortEmployeesBySalary(struct employee * Employees, int n) that sorts the employees array by salary in descending order.

Write a function record * fileSearch(FILE * f, int id) in C…

Write a function record * fileSearch(FILE * f, int id) in C that searches for a student’s record (id, name, gpa) in a file using id. The function receives a FILE pointer and id and returns the record that matches the id. If the record is not found, return NULL. IDs are unique. Assume the file is already opened for reading The following structure is used to store the student records. struct rec{  int id;  char name;  float gpa;}; typedef struct rec record; Examples: Consider the following space delimited file called students.txt. 101 John 3.5102 Alice 3.8103 Bob 3.2104 Carol 3.9 FILE * f = fopen(“students.txt”, “r”); fileSearch(f, 101) ⟹  // a pointer to a structure with the following record is returnedfileSearch(f, 105) ⟹ NULL