title: Format specifier for a pointer to a structure
body: <pre><code>#include&lt;stdio.h&gt;
  #include&lt;stdlib.h&gt;
  
  struct Graph
  {
       int v;
  };
  
  int main()
  {
      struct Graph* graph = (struct Graph*) malloc(sizeof(struct Graph));
      graph -&gt; v = 1;
      printf("%u", graph);
      return 0;
  }
  </code></pre>
  
  <p>But I get a warning regarding the format in line: </p>
  
  <pre><code>printf("%u", graph);
  </code></pre>
  
  <p>The warning is:</p>
  
  <blockquote>
    <p>/home/praveen/Dropbox/algo/c_codes/r_2e/main.c|14|warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 2 has type ‘struct Graph *’ [-Wformat=]|</p>
  </blockquote>
  
  <p>What format specifier should I use for type <code>struct Graph *</code>?</p>