Answers for "how to read a strinng separate from a space from a file 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 "how to read a strinng separate from a space from a file in c"

Code answers related to "C"

Browse Popular Code Answers by Language