title: Is there a way to print out the type of a variable/pointer in C?
body: <p>I want to print out (or otherwise ascertain) the type of some variable in my program.  Is there a good way to do it?  By good, I mean a way that works, even if it means intentionally throwing compiler errors.</p>
  
  <p>For example:</p>
  
  <pre><code>client.c:55: error: incompatible types in assignment
  </code></pre>
  
  <p>is the error I'm getting right now.  What I WANT is it to tell me something like:</p>
  
  <pre><code>client.c:55: error: attempting to assign type struct a to type struct b
  </code></pre>
  
  <p>or a function that I can use like so:</p>
  
  <pre><code>printf(gettype(x));
  </code></pre>
  
  <p>which would output:</p>
  
  <pre><code>struct b
  </code></pre>