Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1) Create the following car data in parallel arrays (set these values with an initialization list or otherwise set the values inside the program.) You

1) Create the following car data in parallel arrays (set these values with an initialization list or otherwise set the values inside the program.) You may also use parallel vectors if you would like. It is up to you. Make Model Color Year Mileage VIN 1. Porsche 911 Silver 2005 18990 1237362 2. Ford Mustang Red 2007 49842 7337372 3. Chevrolet Beretta Black 1989 90332 2873644 4. Ford Focus White 2008 150 9236498 5. Voltzwagon Jetta Black 2006 28002 4673992 6. Rolls Royce Ghost Silver 2005 10000 9292983 7. Mazda 626 Blue 2002 84754 7364646 8. Toyota Camry Red 2004 50332 2133737 9. <>

2) Set a pointer to each of the arrays that hold the information on the sample items in inventory. Demonstrate pointer arithmetic (page 508-511) by writing a loop that prints out all of the values in the Car arrays for the user and uses the pointers and pointer arithmetic 3) Ask the user for a value to change for a car in the array (for a part of a car you choose like color or year) and change that value through a pointer. Ask the user for a value to change for a different car in the array (for a part of a car you choose like color or year) and change that value through a pointer.

4) Redisplay the array to show the values in the current set of car data by using pointers, and pointer arithmetic to see the two changed values.

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

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

1285427106, 978-1285427102

More Books

Students also viewed these Databases questions

Question

Describe the differences between ETFs and mutual funds.

Answered: 1 week ago