TO remove extra spaces form the string.

Can anyone here provide me the c/c++ code for removing the excess spaces formj the string input.

for ex.
string   string          string
is the input
the expected output is to be
string string string
How are you reading that input?
the input is given in the char array.
now we have to manipulate the array so that it does not have any undesirable extra space. constraints to this problem is that you dont have to use any other extra array.

for ex.

string string string

is the input to an array
the expected output is to be

string string string
Topic archived. No new replies allowed.