title: weird difference between int pointer and float pointer
body: <p>please see my codes below</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stddef.h&gt;
  
  typedef struct _node
  {
  int a;
  char *s;
  }Node, *nodePtr;
  
  int main(int argc, char *argv[])
  {
  char *str = "string"; /*str points to satic storage area*/
  Node nd;
  nodePtr pNode = NULL;
  size_t offset_of_s = offsetof(Node,s);
  
  nd.a = 1;
  nd.s = str;
  
  pNode = &amp;nd;
  
      /*Get addr of s, cast it to a different data types pointer, then de-reference it*/
  
  /*this works, print "string"*/
  printf("%s\n", *(int*)((char*)pNode + offset_of_s));
  
  /*this sucks, print (null)*/
  printf("%s\n", *(float*)((char*)pNode + offset_of_s));
  
  return 0;
  } 
  </code></pre>
  
  <p>i attempt to get the address of the <strong>s</strong> member of the Node structure, <strong>cast</strong> it to a data types not less than 4 bytes(<strong>4</strong> byte is the width of a <strong>pointer</strong> on my machine), then de-reference the pointer as a argument to <strong>printf</strong>.</p>
  
  <p>i do think the outcome of two printfs should be the <strong>same</strong>, but the second one displays <strong>"(null)"</strong> .</p>
  
  <p>float and int have the same byte width on my machine,  is the <strong>internal different representation</strong> of the two types that cause this ? </p>
  
  <p>thanks in advance !</p>