Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please solve the c++ program .answer all the question QUESTION 4 (15 MARKS) The following struct declaration is used to keep the data of cars

image text in transcribedplease solve the c++ program .answer all the question

QUESTION 4 (15 MARKS) The following struct declaration is used to keep the data of cars rented in a rental company: struct Rentalcar 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle 11G SQL

Authors: Joan Casteel

2nd Edition

1133947360, 978-1133947363

More Books

Students also viewed these Databases questions