title: Arbitrary length string in C
body: <p>I need to do some manipulation on a string (like adding letters at certain places). I don’t know what its size will be, it depends on the input.</p>
  
  <p>How can I define a string without specifying its size? I want it to adapt to any contents I put inside.</p>
  
  <p>And why can’t I just pass an empty <code>char *</code> to a method? The compiler doesn’t allow that.</p>
  
  <p>According to the answers, I understand that I can’t create an unlimited size string. But e.g. when I tried to create <code>char arr[100]</code> and my string’s length was only 8 characters, when I printed <code>arr</code> I got more letters then I wanted. Some of them weren’t even part of the string. How is that possible?</p>