solution.c (500B)
1 void process(line) 2 char line[]; 3 { 4 char *line_ptr, ninth_char; 5 int char_count = 0; 6 7 printf("\nString: "); 8 9 for (line_ptr = line; *line_ptr != '\0'; ++line_ptr) { 10 ++char_count; 11 if (char_count == 10) { 12 ninth_char = *line_ptr; 13 } 14 putchar(*line_ptr); 15 if (*line_ptr == ' ') { 16 *line_ptr = '-'; 17 } 18 } 19 20 printf("\nCount=%d\n", char_count); 21 22 if (char_count > 10) { 23 printf("The ninth character is: %c\n", ninth_char); 24 } 25 26 printf("String: %s\n", line); 27 }