char* st[200];
int size = split(s, st);
int split(char str[], char *ret[]){
...
strcpy(ret[c], pch);
...
}
this is what is wrong, you just pass bunch of uninitialized pointers to strcpy while it requires pointer that points to valid allocated memory.