title: how to see address of a structure in printf
body: <p>I have a function which returns address as following</p>
  
  <pre><code>struct node *create_node(int data)
  {
          struct node *temp;
          temp = (struct node *)malloc(sizeof(struct node));
          temp-&gt;data=data;
          temp-&gt;next=NULL;
          printf("create node temp-&gt;data=%d\n",temp-&gt;data);
          return temp;
  }
  </code></pre>
  
  <p>where struct node is </p>
  
  <pre><code>struct node {
          int data;
          struct node *next;
  };
  </code></pre>
  
  <p>How can I see in printf("") the address stored in temp?</p>
  
  <p><strong>UPDATE</strong><br>
  If I check the adressed in gdb the addresses are coming in hex number format i.e.
  0x602010 where as same address in <code>printf("%p",temp)</code> is coming in a different number which is different from what I saw in gdb print command.</p>