title: How to check if a variable has been initialized in C?
body: <p>Is there a way to check if a variable has been initialized or not in C?</p>
  
  <p>Consider the following example,</p>
  
  <pre><code>int main(){
      int a = 3, b = 7, c;
  
      if ( a &gt; b )
          c = a-b;
  
      // Now, how can I check if the variable "c" has some value or not
      // I don't want check like this,
      // if ( isalpha(c) ) or if ( isdigit(c) )
      // or anything similar to like that
  }
  </code></pre>
  
  <p>In other words, does C has some function like <code>defined</code> in <code>Perl</code>. In <code>Perl</code>, I can simply do <code>if (defined c)</code>that would check if the variable is defined or not, and it'd return False for above example. How can I achieve the same in C?</p>