#include <stdio.h>
#include <string.h>
void del_char(char str[], int index, int total) {
int j = 0;
for (int i = 0; str[i] != '\0'; i++, j++) {
if (i == (index - 1)) {
i = i + total;
}
str[j] = str[i];
}
str[j] = '\0';
}
int main(){
char s[] = "c programming";
del_char(s, 3, 1);
puts(s);
return 0;
}
/*
run:
c rogramming
*/