title: Understanding char array[] and string
body: <p>I am new to programming. I am learning C as my first programming language. I found something strange to understand. </p>
  
  <p>I have learnt that in C we can represent a String as a sequence of characters like this (using a char array):  </p>
  
  <pre><code>char status[10] = "Married";   
  </code></pre>
  
  <p>I have learnt that the problem of this approach is that we have to tell the size of the <code>status</code> array during compilation.  </p>
  
  <p>But now I have learned we can use a <code>char</code> pointer to denote an <code>string</code>  like - </p>
  
  <pre><code>char status[10] = "Married";
  char *strPtr;
  strPtr = status;
  </code></pre>
  
  <p>I don't understand it properly. My questions are - </p>
  
  <ol>
  <li><p>How can I get char at index 4 (that is <strong>i</strong> in <strong>Married</strong>) using the <code>strPtr</code>?   </p></li>
  <li><p>In <code>status</code> there is a null character (<code>\0</code>) at the end of the <code>string</code> represented by the <code>char</code> array - <code>M</code>-<code>a</code>-<code>r</code>-<code>r</code>-<code>i</code>-<code>e</code>-<code>d</code>-<code>\0</code>. So by using the null character (<code>\0</code>) we can understand the end of the string. When we use <code>strPtr</code>, how can we understand the end of the <code>string</code>?</p></li>
  </ol>