Check out example codes for "c substring". It will help you in understanding the concepts better.

Code Example 1

char subbuff[5];
memcpy( subbuff, &buff[10], 4 );
subbuff[4] = '\0';

Code Example 2

//where we want the word "test" and we know its position in the string
char *buff = "this is a test string";
printf("%.*s", 4, buff + 10);

Learn ReactJs, React Native from akashmittal.com