title: why when declare a dynamic variable, reserves more than specified
body: <p>I have the following code</p>
  
  <pre><code>char *str = (char *) malloc(sizeof(char)*5);
  printf("Enter a string: ");
  scanf("%s", str);
  printf("%s\n", str);
  </code></pre>
  
  <p>This code supposed will reserve 5 places in memory <code>ex: 5 * 8 bit</code>, this mean that will stores five characters.<br>
  Now, when enter any number of characters (not up to five only), does not occur any error whether in compile time or in run time.<br>
  <strong>is this normal? or there is an error I did not understand in my code ?</strong></p>