I wrote my code as below:
But now I want to make it as Define a function void search_course(course arr, int length) which searches the array of courses for the input department and course number. Make sure to use the string library when comparing strings such as the department.
The code works fine, but I am not sure how to create a function for search and then call it in main().
any help would be great!