title: Changing pointer address - function
body: <p>I have problem with pointers.
  This is working fine - </p>
  
  <pre><code>int main(void){
      char *w;
      w = calloc(20, sizeof(char));
      w = "ab";
  
      printf("%c",*w);
      w = w + sizeof(char);
      printf("%c",*w);
  
      return 0;
  }
  </code></pre>
  
  <p>but if i use function like:</p>
  
  <pre><code>void por(char *t){
      t = t + sizeof(char);
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>int main(void){
      char *w;
      w = calloc(20, sizeof(char));
      w = "ab";
      printf("%c",*w);
      por(w);
      printf("%c",*w);
  
      return 0;
  }
  </code></pre>
  
  <p>then it prints "aa" instead of "ab".
  I know its probably pretty stupid question, but i don't know what is going and how to solve that issue.</p>