Question: Write a function called delete_repeats that has a partially filled array of characters as a formal parameter and that deletes all repeated letters from
Write a function called delete_repeats that has a partially filled array of characters as a formal parameter and that deletes all repeated letters from the array. It returns a new dynamic array where all repeated letters are deleted. Do not modify the input array. For example, consider the following code: char str[100] = "to be or not to be"; int size strlen(str); char *noRepeat; noRepeat == delete_repeats (str, size); cout < < noRepeat; Will print out to bern Let's assume that the characters are case insensitive. Don't forget to free the memory allocated for these returned dynamic arrays when the data is no longer needed.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
