Answers for "This program takes string and its substring as input and removes the substring using pointer"

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 "This program takes string and its substring as input and removes the substring using pointer"

Code answers related to "C"

Browse Popular Code Answers by Language