char* string; char* first; char* second; for (int i=0;i<=strlen(string);i++) { if (string[i] == ' ') { string[i] = ' '; first = string; second = string+i+1; break; } }