Answers for "split string based on delimiter space in c"

C
-2

split string at space C

char* string;
char* first;
char* second;

for (int i=0;i<=strlen(string);i++) {
	if (string[i] == ' ') {
		string[i] = '\0';
		first = string;
		second = string+i+1;
		break;
	}
}
Posted by: Guest on February-22-2021

Code answers related to "split string based on delimiter space in c"

Code answers related to "C"

Browse Popular Code Answers by Language