Im having problems with this piece of code
string_array[1001] = "Hello Everyone6415!";
for (i = 0; i < 1000; i++) {
if (isdigit(string_array[counter])) {
string_array[counter] = ' ';
counter++;
} else {
string_array[counter] = string_array[counter];
counter++;
Output:Hello Everyone !
Is there a way to replace the numbers with nothing at all?
Tried to use another counter, new array, NULL. What am I expecting the code to do is to print Hello Everyone!
memmove()can help if you know what the length is. There's no O(1) solution unless you switch from ordinary C strings to some more elaborate data structure.