#include int main() { char a[] = "Hello, world"; extern void chop_word(char *s); printf("before: %s\n", a); chop_word(a); printf("after: %s\n", a); return 0; } void chop_word(char *s) { for (; *s != '\0' && *s != ' '; s++) ; *s = '\0'; }