title: How to print a guint64 value when using glib?
body: <p><strong>Problem</strong></p>
  
  <p>I am making use of the GLib 2.0 library, and declared a gunit64 variable. I wish to print its value to screen, but its not working properly.</p>
  
  <p><strong>Code</strong></p>
  
  <p>Consider the following code snippet as an example. I declare a guint64 variable, and try to print its value.</p>
  
  <pre><code>guint64 myValue = 24324823479324;
  printf("My Value: %d\n", myValue);
  </code></pre>
  
  <p><strong>Warning</strong></p>
  
  <p>I get this warning:</p>
  
  <pre><code>warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘guint64’ 
  </code></pre>
  
  <p><strong>Output</strong></p>
  
  <p>I get a strange negative number on screen:</p>
  
  <blockquote>
    <p>My Value: -1871285220</p>
  </blockquote>
  
  <p><strong>Further Comments</strong></p>
  
  <p>I tried to search the API's documentation, and I found the following under guint64:</p>
  
  <blockquote>
    <p>An unsigned integer guaranteed to be 64 bits on all platforms. Values
    of this type can range from 0 to G_MAXUINT64 (=
    18,446,744,073,709,551,615).</p>
    
    <p>To print or scan values of this type, use G_GINT64_MODIFIER and/or
    G_GUINT64_FORMAT.</p>
  </blockquote>
  
  <p>Therefore, I assume I have to use either the modifier or format definitions. However, the documentation does not show how to use them. Can anybody help me please?</p>