title: How to add an element to Global char *Array[]?
body: <p>How to add some element to globally declared char array &amp; access the elements of the array from the another function?</p>
  
  <p>I declared like this in source file</p>
  
  <pre><code>extern char *ArrayItems[] = {"Item1"};
  </code></pre>
  
  <p><strong>Function 1 - Add element into Array</strong></p>
  
  <pre><code>void AddSomeElementToGloablArray()
  {
    ArrayItems[1] = "Item 2";
    ArrayItems[2] = "Item 3";
  ...
  }
  </code></pre>
  
  <p><strong>Function 2 - Add again some element into Array</strong></p>
  
  <pre><code>void AddSomeElementToGloablArray()
  {
    ArrayItems[3] = "Item 3";
    ArrayItems[4] = "Item 4";
  ...
  }
  </code></pre>
  
  <p><strong>Main Function - To access the element of the array</strong> </p>
  
  <pre><code>void Main()
  {
    AddSomeElementToGloablArray();
    char *ItemValue = ArrayItems[3];
  }
  </code></pre>
  
  <p>I tried like above code but it does not return added element. Here I cannot pass or return an array from function.
  Please anybody help</p>