Replacing characters in strings malloc
问题 Given a string and two characters, I want to find how many times the first character exists on the string, in what position it appears first and create a new string where the second character replaces the first every time it shows up, but I'm having problems with the last part. This is what I have so far: #include <stdio.h> #include <string.h> #include <stdlib.h> main () { char string[10], string1; char c1, c2; int contador, i, l, n, contador2; printf ("Introduza uma string e dois caracteres.