Complete function trim_blanks whose purpose is to take a single string input parameter ( to_trim) and return a copy of the string with leading and trailing blanks removed. Use strncpy in trim_blanks. Also, provide the complete C code by calling the function from main. a_string (before) phra 10 n_string (after the call: trim_blanks (n_string, a_string);) phrase 10 a char * trim_blanks (char *trimmed, /* output */ const char *to_trim) /* input */ { /* Find subscript of first nonblank in to_trim */ /* Find subscript of last nonblank in to_trim /* Use strncpy to store trimmed string in trimmed */
0 comments