Lets say I have an array like this:
How would I trim off all the leading and trailing whitespaces?Code:char str[30] = " Hello ";
I tried doing this with a cnt of all non ' ' then making a new array with the size of cnt. Then I noticed that I can't create an array with a variable. So how should I go about this?