title: c printing address of an array pointed to by a pointer
body: <p>In the code below, <code>str</code> is a pointer that stores the address of the array <code>Goodbye</code>. The address of array <code>Goodbye</code> starts at <code>4196004</code> and the value of pointer <code>*str2</code> is <code>-1226226648</code>. My question is, is there a way to print address of array <code>Goodbye</code> using the pointer <code>*str2</code>?</p>
  
  <p>I tried this line <code>printf("%d %d %s\n", *str2, str2, str2);</code> that dereferences <code>str2</code> and it prints <code>71</code> which is ascii for <code>H</code>, but how would I print the address <code>4196004</code></p>
  
  <pre><code>int main(int argc, char **argv) {
  
  char str1[] = "Hello";
  char *str2 = "Goodbye";
  
  printf("%d %d %s\n", &amp;str1, str1, str1);
  printf("%p %d %s\n", &amp;str2, str2, str2);
  
  }
  
  Output: 
  -1226226640 -1226226640 Hello
  -1226226648 4196004 Goodbye
  </code></pre>