Answers for "c substring"

C
3

c substring

char subbuff[5];
memcpy( subbuff, &buff[10], 4 );
subbuff[4] = '\0';
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 "C"

Browse Popular Code Answers by Language