title: Why does this *ptr NOT give the actual value stored at the memory address contained in ptr variable?
body: <p>Here is a basic C program about pointers:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main() {
      int variable = 20;
      int *pointerToVariable;
  
      pointerToVariable = &amp;variable;
  
      printf("Address of variable: %x\n", &amp;variable);
      printf("Address of variable: %x\n", pointerToVariable);
      printf("Address of variable: %x\n", *pointerToVariable); // * is the DEREFERENCING OPERATOR/INDIRECTION OPERATOR in C. 
                                                                  //It gives the value stored at the memory address 
                                                                  //stored in the variable which is its operand.
      getchar();
      return 0;
  }
  </code></pre>
  
  <p>This produces the following output:</p>
  
  <pre><code>Address of variable: 8ffbe4
  Address of variable: 8ffbe4
  Address of variable: 14
  </code></pre>
  
  <p><strong>But <code>*pointerToVariable</code> should print 20, shouldn't it? Because <code>*</code> gives the actual value stored at the memory address stored in its operand, right?
  What am I missing?</strong></p>