title: How to add "\n" at the end of a string in C
body: <p>I know how to do it on the string, so <code>"hello world"</code> would be <code>"hello world\n"</code>. But if I have something like <code>char *str = "helloworld".</code> and I want to add \n at the end of str, how am I supposed to do it? </p>