#include <stdio.h>
#include <string.h>
void remove_multiple_spaces_from_a_string(char* s) {
char *p;
while ((p = strstr(s, " "))) {
strcpy(p, p + 1);
}
if (s[0] == ' ') strcpy(s, s + 1);
if (s[strlen(s) - 1] == ' ') s[strlen(s) - 1] = '\0';
}
int main(void) {
char s[64] = " c c++ python java ", tmp[64];
remove_multiple_spaces_from_a_string(s);
printf("%s", s);
}
/*
run:
c c++ pyhon java
*/