Question: The following code is in the C programming language. Sort the airports alphabetically by the string named LocID. Some airports LocID begin with numerical digits,
The following code is in the C programming language.
Sort the airports alphabetically by the string named LocID. Some airports LocID begin with numerical digits, there are also a few that contain two trailing digits, these airport LocIDs can be discarded. You may also discard any airport that does not contain three or four letters.

The following is the data structure

Examples of LocID:
FL76
MCO
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
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
