Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In C++, write two functions named printArray and deleteRepeats along with a main to test them according to the following specifications. Be sure to use

In C++, write two functions named printArray and deleteRepeats along with a main to test them according to the following specifications. Be sure to use function prototypes and place the actual function definitions after main.

printArray will take two parameters: an array of characters and an integer representing the number characters stored in the array. It will print the characters from the array, labeled by their index, to the screen up to the specified size.

deleteRepeats will take the same two parameters, except that the integer must be passed by reference. The function must remove any repeated characters from the array and reduce the size to match the reduced number of characters. The contents of the array beyond the newly reduced size do not matter.

main must test deleteRepeats with 4 different sets of data. For each test, you will print the array, call deleteRepeats, and then print the array again. One data set must contain only unique characters. One data set must contain one character repeated several times. Two will be different mixtures of characters, including some repetition. Make sure at least of your arrays is completely full to start with and that at least one of them is not completely full to start with.

There should be no user interaction in this program.

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 Database Upgrade Migration And Transformation Tips And Techniques

Authors: Edward Whalen ,Jim Czuprynski

1st Edition

0071846050, 978-0071846059

More Books

Students also viewed these Databases questions

Question

How do books become world of wonder?

Answered: 1 week ago