The code takes user input(html tag)
ex:
<p> The content is text only inside tag </p>
gets(str);
Task is to replace all occurences with a newline("\n")
while((ptrch=strstr(str, " ")!=NULL)
{
memcpy(ptrch, "\n", 1);
}
printf("%s", str);
The code above replaces only first character with \n.
Query is how to replace entire with \n or how to set rest of nbsp; to something like empty character constant without terminating string with null pointer('\0').
gets().. usefgetsinstead