Question: c++ Ex 1. Basic Array Operations (40 points) Implement each of the following functions that perform basic array operations. // Fills the array with the
Ex 1. Basic Array Operations (40 points) Implement each of the following functions that perform basic array operations. // Fills the array with the numbers: end, end- 1, end-2, -, end- size - 1. void fill(int a[], int size, int end); // Checks if all of the characters that are in the array are the same. bool sameChar(char c[], int size); // Checks if there are no repeated characters in the array. bool different char(char [], int size); Hint: To know if all the elements in the array are different, you can compare every element to every other element in the array // Checks if the first n/2 characters in the given string are the same as the last n/2 // characters, where n is the length of the string (name.length()). For example: // if name = "abcdabcd" the function should return true // if name = "eee-eee" the function should return true // if name = "1234321" the function should return false // if name = "whatever" the function should return false // if name = "a" the function should return true bool is_duplicated (string name)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
