title: Why is the dereference of float pointer set to int variable's address printing as `0`?
body: <p>I created the following code while playing with pointers -</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  int main()
  {
      float a=1000;
      int *c=&amp;a;
      float *d=&amp;a;
      printf("\nValue of a is %f",a);
      printf("\nValue of a is %f",*c);
      printf("\nValue of a is %f",*d);
      printf("\nValue of a is %f",*&amp;*c);
      printf("\nValue of a is %f\n",*&amp;*d);
  
      int b=2000;
      int *e=&amp;b;
      float *f=&amp;b;
      printf("\nValue of b is %d",b);
      printf("\nValue of b is %d",*e);
               printf("\nValue of b is %d",*f);      //Will produce 0 output
               printf("\nValue of b is %d",*&amp;*e);
               printf("\nValue of b is %d\n",*&amp;*f);  //Will produce 0 output
  
               float g=3000;
               float *h=&amp;g;
               printf("\nValue of g is %f\n",*h);
  }
  </code></pre>
  
  <p>Which has produced the output -</p>
  
  <pre><code>aalpanigrahi@aalpanigrahi-HP-Pavilion-g4-Notebook-PC:~/Desktop/C/Daily programs/pointers$ ./pointer004
  
  Value of a is 1000.000000
  Value of a is 1000.000000
  Value of a is 1000.000000
  Value of a is 1000.000000
  Value of a is 1000.000000
  
  Value of b is 2000
  Value of b is 2000
  Value of b is 0
  Value of b is 2000
  Value of b is 0
  
  Value of g is 3000.000000
  </code></pre>
  
  <p>And For the second part where the <strong>variable b</strong> has been declared as <strong>integer</strong> and <strong>*e and *f</strong> are pointers , the value of b is printing out to be 0 in case of <strong>*f and *&amp;*f</strong> (as shown in the code) but this has worked in the case above that where <strong>variable a</strong> has been declared as a floating point number. </p>
  
  <p>Why is this happening ??</p>