title: Updating pointer address in function, when passed as an argument. [ passing pointer as reference in C]
body: <p>CONCEPT: Passing pointer by reference</p>
  
  <p>Trying to achieve: To get updated pointer address from function, when passed as an argument.</p>
  
  <pre><code>int main(void)
  {
      uint8_t unArray[10] = {0};  // unint8_t is type def as unsigned char
      uint8_t * pmyPtr;
  
      pmyPtr = unArray;
  
      func(pmyPtr);
  
      *pmyPtr = someValue3; 
  
  }
  
  void func(uint8_t * unPtr)
  {
      *unPtr = someValue1;
       unPtr++;
      *unPtr = someValue2;  
       unPtr++;  
  
  }
  </code></pre>
  
  <p>Suppose we have unArray address as 0x0001000. So pmyPtr will have 0x0001000 as its assigned a constant pointer.</p>
  
  <p>When pointer is passed to the function func some indexes of array (first two) are updated by DE-referencing.</p>
  
  <p>When I come back to the main after func execution I am trying to update the third index. How can this be achieved. I have a hunch that double De-referencing might be handy.</p>