title: Which specifier to use to print the max/min value of long double?
body: <p>As a new C programming learner, I'm trying to understand which specifier I should use in printf to display the maximum and minimum values of a long double type. Per the following StackOverflow answer, I can use %Lg: <a href="https://stackoverflow.com/a/18797417/1536240">https://stackoverflow.com/a/18797417/1536240</a></p>
  
  <p>But that doesn't seem to do the trick. I've tried %e, %f, %Lf, %g and %Lg, but it's not working. Here's the relevant part of my code I'm having issues with (the rest of the stuff I'm doing's working fine):</p>
  
  <pre><code>printf("**long double**\nStorage size: %d bytes \t Minimum value: %Lg 
  \t Maximum value: %Lg\n", sizeof(long double), LDBL_MIN, LDBL_MAX);
  </code></pre>
  
  <p>I've included these header files at the top:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;limits.h&gt;
  #include &lt;float.h&gt;
  </code></pre>
  
  <p>I'm kinda lost here.</p>
  
  <p><strong>EDIT:</strong> Sorry for not explaining what the output is. I'm using %Lg right now, and I'm getting this in the terminal.</p>
  
  <p><a href="https://i.stack.imgur.com/jfHt9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jfHt9.png" alt="my output"></a></p>