title: What is the significance of forward declaration in C programming?
body: <p>I am now learning C programming through Learn C the Hard Way by Zed A. Shaw. There is this code (taking from his website):</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;ctype.h&gt;
  
  // forward declarations
  int can_print_it(char ch);
  void print_letters(char arg[]);
  
  void print_arguments(int argc, char *argv[])
  {
      int i = 0;
  
      for(i = 0; i &lt; argc; i++) {
          print_letters(argv[i]);
      }
  }
  
  void print_letters(char arg[])
  {
      int i = 0;
  
      for(i = 0; arg[i] != '\0'; i++) {
          char ch = arg[i];
  
          if(can_print_it(ch)) {
              printf("'%c' == %d ", ch, ch);
          }
      }
  
      printf("\n");
  }
  
  int can_print_it(char ch)
  {
      return isalpha(ch) || isblank(ch);
  }
  
  
  int main(int argc, char *argv[])
  {
      print_arguments(argc, argv);
      return 0;
  }
  </code></pre>
  
  <p>Don't we just can code it like this (put the <code>can_print_it</code> and <code>print_letters</code> functions at the top and remove the need for forward declaration):</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;ctype.h&gt;
  
  int can_print_it(char ch)
  {
      return isalpha(ch) || isblank(ch);
  }
  
  void print_letters(char arg[])
  {
      int i = 0;
  
      for(i = 0; arg[i] != '\0'; i++) {
          char ch = arg[i];
  
          if(can_print_it(ch)) {
              printf("'%c' == %d ", ch, ch);
          }
      }
  
      printf("\n");
  }
  </code></pre>
  
  <p>Is there really times when the forward declaration is important and unavoidable?</p>