I am a student who really needs some assistance with creating a recursive function in C that changes multiple consecutive white spaces (blanks) from an array of characters into a single blank. For instance:
char c ; // let ␢= blank symbol
where the contents are :␢␢␢␢INT␢␢␢
the outcome should be ␢INT␢
NOTE: I somehow need to keep track of the size of the array for actual latter access.
I really suck at recursion and I know that I must first establish a BASE CASE, where the recursion eventually stops, but came up with nothing serious. I am thinking maybe that the recursive call should start as soon as the first blank is identified, and from there remove the blanks. The base case will be the identification of a character other than a blank or reached the end of the array.
THANKS FOR ANY HELP