title: Print value and address of pointer defined in function?
body: <p>I think this is a really easy thing to code, but I'm having trouble with the syntax in C, I've just programmed in C++.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  void pointerFuncA(int* iptr){
  /*Print the value pointed to by iptr*/
  printf("Value:  %x\n", &amp;iptr );
  
  /*Print the address pointed to by iptr*/
  
  /*Print the address of iptr itself*/
  }
  
  int main(){
  
  void pointerFuncA(int* iptr); 
  
  return 0;
  }
  </code></pre>
  
  <p>Obviously this code is just a skeleton but I'm wondering how I can get the communication between the function and the main working, and the syntax for printing the address pointed to and of iptr itself? Since the function is void, how can I send all three values to main? </p>
  
  <p>I think the address is something like:</p>
  
  <pre><code>printf("Address of iptr variable: %x\n", &amp;iptr );
  </code></pre>
  
  <p>I know it's a simple question, but all the examples I found online just got the value, but it was defined in main as something like </p>
  
  <pre><code>int iptr = 0;
  </code></pre>
  
  <p>Would I need to create some arbitrary value? </p>
  
  <p>Thanks!</p>