get part of string c code example Example: c substring char subbuff[5]; memcpy( subbuff, &buff[10], 4 ); subbuff[4] = '\0';