title: Why does puts() function gives me a heart symbol?
body: <p>I was trying to figure out that how a string with a known size can be filled with single characters. Then I wrote this simple code for a bigger problem that I have
   (<em>dynamic filling of a string with unknown size</em>)
  . When I tried to compile and run this code I encountered a problem which output had a heart symbol! and I don't know where it comes from.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  int main()
  {
      int i;
      char str[3];
      for(i=0;i&lt;=2;i++){
          str[i]=getc(stdin);
      }
      puts(str);
      return 0;
  }
  </code></pre>
  
  <p>Thank you.</p>