title: Local Variable in Function
body: <p>I found out something hilarious problem in C.<br>
  Here is my Code</p>
  <pre><code>#include &lt;stdio.h&gt;
  
  void method()
  {
      int indx;
      printf(&quot;%d\n&quot;, indx);
      indx++;
  }
  
  int main(void)
  {
      method();
      method();
      method();
  
  }
  </code></pre>
  <p>This is simple example.
  indx variable is not initialized. So, The result of printf in method function would be something strange value.<br>
  And indx is local variable. So indx++ is useless.
  But The answer is</p>
  <pre><code>0
  1
  2
  </code></pre>
  <p>It seems like that indx is remain <br>
  I can't understand. why?</p>