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

In C Language Please

In C Language Please A file called "flights.txt" maintains a list of

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 airlines name, the YYYY is the flight number, and S is the status of the flight which can take values D: departed, L: landed, or C: cancelled. Sample entries are as follows BA 1234D DL 7897L MA 828C 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 screen. Else the programs asks for the flight status and adds it at the end of "flights.txt." Sample Code Execution: Red text indicates information entered by the user Enter the airline and flight number:BA 1234 Flight BA 1234 has departed Enter the airline and flight number:MA 828 Flight MA 828 was cancelled Enter the airline and flight number:AA 1045 Flight AA 1045 was not found. What is the status?D Flight AA 1045 has been added to the database

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!