Question: The following struct declaration is used to keep the data of cars rented in a rental company: struct Rentalcar 1 int ID; string model; bool

 The following struct declaration is used to keep the data of

The following struct declaration is used to keep the data of cars rented in a rental company: struct Rentalcar 1 int ID; string model; bool auto; a) A maximum of 20 cars can be rented per day. Declare a constant named SIZE with value 20. (1 mark) b) To keep the list of cars rented, declare an array of Rentalcar named rentlist that can hold maximum number of rented cars per day. Use the constant SIZE declared. (2 marks) c) The first car rented has ID of 1001. Assign the number to the ID of the first element of rentList. (2 marks) d) A car with automatic transmission has its auto value set to true. Define a function to print only the ID and the model of the cars in rentList with automatic transmission. The calling function is written as follows: printAuto (rentList); (10 marks)

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!