Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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 databaseStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started