For example, I have this
char *buff = "this is a test string";
and want to get "test". How can I do that?
"test"
char subbuff[5]; memcpy( subbuff, &buff[10], 4 ); subbuff[4] = '\0';
Job done :)