title: Can we declare functions inside functions?
body: <pre><code>#include &lt;stdio.h&gt;
  
  int main()
  {
     void foo();
     printf("1 ");
     foo();
  }
  
  void foo()
  {
      printf("2 ");
  }
  </code></pre>
  
  <p><strong>Output:</strong></p>
  
  <pre><code>1 2
  </code></pre>
  
  <p>How declaring functions inside functions work?
  Does it mean that foo() function can only be called by main()?</p>