title: Passing a pointer from a function to another function
body: <p>I am looking for a way to pass a pointer from <em>not</em> main function to another function. A variable x with value 5 sends as pointer to func1, func1 changes variable value to 10, then func1 sends same variable to func2.</p>
  
  <p>I want it to look something like that:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  void func1(int *px);
  void func2();
  
  int main(void)
  
  {   
      int x=5;
      printf("x in main %d\n", x);
      func1(&amp;x);
  
      return 0;
  }
  
  void func1(int *px)
  {
      *px = 10;
      printf("x i funk 1 %d\n", *px);
      funk2(); // send to this function a pointer to x, which in this function(func1) is pointed by *px
      funk3();
  }
  
  void func2()
  {
      //*px=15 // here I want to change value of x 
  }
  </code></pre>