first question is: is it even possible to do with an array?? I've seen some suggestions saying that it is not to use a list instead of an array, but my problem is i have to use arrays in my program
`for(j=0;j<size_array;j++){
if(strcmp(a[j],input)==0){
strcpy(a[j], "\0");
a[j] = a[j-1];
size_array--;
}
}`
this is what i have tried and it gives me the following result:
a[0] = "apple"
a[1] = "banana"
a[2] = //removed item
a[3] = "orange"
is there a way to move "orange" to position a[2] like so:
a[0] = "apple"
a[1] = "banana"
a[2] = "orange"
Thanks in advance
forloop you posted so that it will move everything from the empty spot?