void find_and_replace (char *A, char *oldc, char *newc) {for (int i=0; i<5; i++)for (int j=0; j<3; j++)if (A[i] == oldc[j]) A[i] = newc[j];}The procedure is tested with the following four test cases.(1) oldc = “abc”, newc = “dab”(2) oldc = “cde”, newc = “bcd”(3) oldc = “bca”, newc = “cda”(4) oldc = “abc”, newc = “bac”