#include #include /* need to include for strlen, strcmp, strcpy functions */ #define SIZE 80 void displayString(char x[]); void removeWhiteSpace(char x[], char temp[]); int main() { char whiteSpaceWord[SIZE + 1] = " Seneca college"; char temp[SIZE + 1]; int i; displayString(whiteSpaceWord); removeWhiteSpace(whiteSpaceWord, temp); displayString(whiteSpaceWord); } void displayString(char x[]) /* Displays array's contents */ { printf ("x - I want word to line up under the x\n"); printf ("%s\n\n", x); } /* End of displayString function */ void removeWhiteSpace(char x[], char temp[]) { int i = 0, j = 0, k; strcpy (temp, x); /* copy word to temp */ /* Manipulate order of elements in array to remove whitespace */ while (temp[i] == ' ') i++; for (k = i; k < strlen(temp); k++) x[j++] = temp [k]; x[j] = '\0'; /* add delimeter at string's end */ }