Exercise: Copy and Reduce String

  • Write a function (and the program with the main() function calling that function) similar to what we just saw.

    Instead of just omitting the given character, it reduces consecutive occurences of that character to just one.

  • The function does not check for overflow: fix that!

    Add overflow protection, by adding one parameter size which contains the maximum size of the destination string.