Getting the string "abxcxxdxxxef" you need to get the string "abcdef". Wrote code that removes x only if x does not go in a row. That is, the output is the string "abcxdxef".
I understand why this is happening, but I do not understand how to fix it. I would be grateful for the explanation (in priority) how to fix it and / or the corrected part of the code.
for (place = 0; str[place] != '\0'; place++) { if (str[place] == 'x') for (int i = place; str[i] != '\0'; i++) str[i] = str[i + 1]; }
xfrom a string? - entithatx, after whichxgoes again? - VTT