Question: IN C PLEASE A file called flights.txt maintains a list of flights that are departing and arriving at an airport in the following format XX


IN C PLEASE
A file called "flights.txt" maintains a list of flights that are departing and arriving at an airport in the following format XX YYYY S. The XX is an abbreviation of the airline's name, the YYYY is the flight number, and is the status of the flight which can take values D. departed, L landed, or C canceled Sample file entries are as follows BA 1234 DL 7897 MA 828 C Develop a program that asks the user to enter the flight details and searches the file for a match. If a match is found the flight details are printed on the screen. Else the program asks for the flight status and adds it at the end of flights.txt Sample Output 1 Enter the airline and flight number BA 1234 Flight BA 1234 has departed. Sample Output 2 Enter the airline and fight number MA 828 Flight MA 828 was canceled, Sample Output 3 Enter the airline and fight number AA 1045 Flight AA 1045 was not found. What is the status? Flight AA 1045 has been added to the database main.c Load default template. 1 include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
