Write a function with an old-style interface that has this prototype: int reduce(long ar[], int n); The
Question:
Write a function with an old-style interface that has this prototype: int reduce(long ar[], int n);
The actual arguments should be the name of an array and the number of elements in the array.The function should sort an array, remove duplicate values, and return a value equal to the number of elements in the reduced array.Write the function using STL functions. (If you decide to use the general unique() function, note that it returns the end of the resulting range.) Test the function in a short program.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Question Posted: