title: When should we use a char pointer ( char *) over a char array (char [] )?
body: <p>Is there any situations where one type is preferred over the other? </p>
  
  <p>The only thing I can think of is...</p>
  
  <p>a pointer uses 4 bytes, and a char array's size depends on the length of the string, so if you have a really big string,it's beneficial to use a char pointer instead in order save memory example: if your passing strings around through arguments.</p>
  
  <p>but in terms of string manipulation, which is preferred?</p>
  
  <p>example:</p>
  
  <pre><code>char *hello_pointer = malloc(sizeof(char) * 20);
  char hello_array[20];
  
  strcat(hello_pointer, "hello pointer");
  strcat(hello_array, "hello array");
  </code></pre>
  
  <p>is there a preference for one over the other in this case?</p>