title: what is the meaning of ii=(char*)&i and a=(char*)&a in the following code
body: <pre><code>#include&lt;stdio.h&gt;
  int main()
  {
      int i = 5;
      float a = 3.14;
      char*ii,*aa;
  
      ii = (char*)&amp;i;
      aa = (char*)&amp;a;
      printf("address contained in ii=%u\n",ii);
      printf("address contained in aa=%u\n",aa);
      printf("value at address contained in ii=%d\n",*ii);
      printf("value at address contained in aa= %d\n",*aa);
      return(0);
  } 
  /*the output for the following program was 
    address contained in ii=65524
  
   address contained in aa=65520
    value at address contained in ii=5
  
    value at address contained in aa=-61*/
  </code></pre>
  
  <p>What is the meaning of <code>ii = (char*) &amp;i</code> and <code>aa = (char*) &amp;a</code> also why does the compiler print value at address in <code>ii</code> to be correct and that in <code>aa</code> to be wrong? If you take any other value of <code>i</code>, say 327, then the value at address contained in <code>ii</code> will turn out to be something else. Can someone please explain it to me? I am not able to get a proper explanation from the book where the code is written. </p>
  
  <p>Program source: understanding pointers in c.  Author : yashvant kanetkar,4th edition.</p>