values terminated by -11, the program should assign -10 to all elements of the array and stop the reading from the standard input. (20 points) 2. Define a non-void function O_F2_6 that takes a 1D array arr as formal parameter. The array arr represents the number of trips for each flight per passenger. The function calculates and returns the average number of trips. (15 points) 3. Define a non-void function O_F3_6 that takes three formal parameters: a 10 array ar of size FLIGHT_SIZE, a 1D array IDs_flights of size FLIGHT_SIZE and the number of trips num_trips. The array arr represents the number of trips for each fight per passenger. The function should search for num_trips in arr and return the flight Id corresponding to the first occurrence of num_trips if found; otherwise, returns -1. (20 points) Part 2: 4. Define a void function O_F4_6 that takes one 2D array Flight_frequency and two 1D arrays, IDs passengers and Freq_flyers as formal parameters. The function should fill the Freq_flyers with the frequent flyer character value for each passenger according to the following table. The function then prints the frequent flyer description for each passenger, as shown in sample output below. (20 points) Sum of trips Frequent flyer Frequent fiyer description < 250 R Regular Silver >=250 and <=1150 >1150 and < 2150 Platinum
values terminated by -11, the program should assign -10 to all elements of the array and stop the reading from the standard input. (20 points) 2. Define a non-void function O_F2_6 that takes a 1D array arr as formal parameter. The array arr represents the number of trips for each flight per passenger. The function calculates and returns the average number of trips. (15 points) 3. Define a non-void function O_F3_6 that takes three formal parameters: a 10 array ar of size FLIGHT_SIZE, a 1D array IDs_flights of size FLIGHT_SIZE and the number of trips num_trips. The array arr represents the number of trips for each fight per passenger. The function should search for num_trips in arr and return the flight Id corresponding to the first occurrence of num_trips if found; otherwise, returns -1. (20 points) Part 2: 4. Define a void function O_F4_6 that takes one 2D array Flight_frequency and two 1D arrays, IDs passengers and Freq_flyers as formal parameters. The function should fill the Freq_flyers with the frequent flyer character value for each passenger according to the following table. The function then prints the frequent flyer description for each passenger, as shown in sample output below. (20 points) Sum of trips Frequent flyer Frequent fiyer description < 250 R Regular Silver >=250 and <=1150 >1150 and < 2150 Platinum
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
with in 20 min .i had no time left ,You can skip if had no knowledge
Don't copy from internet else i downvote .
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 9 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education