Answers for "substring of a given string c"

C
4

c substring

char subbuff[5];
memcpy( subbuff, &buff[10], 4 );
subbuff[4] = '';
Posted by: Guest on March-19-2020
2

c substring

//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);
Posted by: Guest on June-21-2020

Code answers related to "substring of a given string c"

Code answers related to "C"

Browse Popular Code Answers by Language