Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need help with understanding the function\'s declaration. I\'m not sure where

ID: 3867810 • Letter: I

Question

I need help with understanding the function's declaration. I'm not sure where lListAirPdata is coming from, any help? All I know is that there is a structure given to me called airPdata.

1.4.2 void sortByLocID(lListAirPdata *airports); Description: Sorts the airports alphabetically by the string named Loc ID. Remember that the Loc ID has been filtered to three or four letters Special Cases: Remember the helipads! In other words, it is recommended to skip airports whose Loc ID begin with a number, or start with either FL or X followed by two digits. Therefore, it is recommended to discard any airport whose LocID is not three or four letters Caveat: Since the sorting options are mutually exclusive, this function can destruc- tively manipulate the input list to produce the desired results. Returns: Nothing. However the input data should be seriously modified by this pro- cess

Explanation / Answer

void sortByLocID(lListAirPdata *airports);

In this declaration lListAirPdata is a structure which contains information about the airport data that includes Loc ID which is the location ID of the airport. The structure may also contain the airport name, latitude and longitude of the airport and some other stuff.

airports is the variable of the datatype lListAirPdata which will contain the actual data. And since it is a pointer, it will contain information of more than one airports. It is like array of structure of lListAirPdata.

And the requirement of the function is to sort all these airports in alphabetical order according to the Loc ID.

And the return type is void and the passed argument is a list of airport which is a pointer. List is to be modified or sorted,i.e., various operations are to be performed on the same list.

And while doing sorting helipads are to be skipped and airports whose Loc Id stats with number are to be skipped or starting with FL or X are to be skipped.