// Delete the substrings. If the original substrings have the same substrings, all substrings are deleted. The substring must contain at least two characters. # Include <stdio. h> # include <string. h> char * delete_string (char s [], char a []); int main () {char s [255]; char data [255] [255]; // store the same substring int I, j, k; int length; int ROW = 0, column; // gets (s); length = strlen (s); // find the same substring for (I = 0; I <length-3; I ++) {for (j = I + 1; j <length-1 ;) {If (S [I] = s [J]) & (s [I + 1] = s [J + 1]) {Column = 0; k = 0; do {data [row] [column ++] = s [J]; j ++; k ++ ;} while (s [I + k] = s [J]); Data [row ++] [column] = '\ 0';} else {J ++ ;}} puts ("the same string :"); for (I = 0; I <row; I ++) {puts (data [I]); // output the same substring} for (I = 0; I <row; I ++) {delete_string (S, data [I]) ;}puts ("after deleted:"); puts (s); Return 0 ;} // function: If String S contains sub-string a, delete a from string S. Otherwise, no changes will be made. Char * delete_string (char s [], char a []) {int length_s; int length_a; int I, j, k; length_s = strlen (s ); length_a = strlen (a); for (I = 0; I <length_s;) {J = 0; If (s [I] = A [J]) {do {I ++; j ++;} while (j <length_a) & (s [I] = A [J]); if (j = length_a) {// indicates that S contains the substring A and deletes it. For (k = I; k <= length_s; k ++) {s [k-length_a] = s [k];} I = I-length_a; j = 0 ;} else {J = 0 ;}} else {I ++ ;}} return s ;}