 <p>In your code <code>"pol1"</code> is called a <a href="https://en.wikipedia.org/wiki/String_literal" rel="nofollow"><em>string literal</em></a>. During compilation time, this data is stored into some memory area (<em>usually read-only memory, which cannot be altered, or atleast any attempt to alter the contents will result in <a href="https://en.wikipedia.org/wiki/Undefined_behavior" rel="nofollow">UB</a></em>) which is allocated by the compiler itself. </p> <p>When you use it, you essentially pass the base address of the string literal and collect it into a <code>char *</code> ( same as <code>char []</code> in case of usage in function parameter). There is no need for any allocation from your side.</p>