title: Use scanf() with a pointer
body: <p>I'm trying to pass an address as an argument to a process for an exercise. It doesn't work so I made this simple example to find what is wrong:</p>
  
  <pre><code>int main(int argc, const char * argv[]) {
    int newCounter = 0; // I want to get the value of this using its address
    int *address; // The pointer
    printf("%p\n", &amp;newCounter); // Printing the address
    scanf("%p", address); // We insert the address manually
    printf("%d\n", *address);
  }
  </code></pre>
  
  <p>When I'm running this program I get a message <code>Segmentation fault: 11</code> after inserting the address of <code>newCounter</code> manually and pressing Enter, does someone know what is wrong with this code?</p>