#include <stdio.h>
#include <string.h>
void remove_first_occurrences(char s[], char ch) {
int i = 0, len = strlen(s);
while(i < len && s[i] != ch)
i++;
while(i < len) {
s[i] = s[i + 1];
i++;
}
}
int main() {
char s[] = "c c++ c# java php python cobol";
remove_first_occurrences(s, 'p');
puts(s);
return 0;
}
/*
run:
c c++ c# java hp python cobol
*/