title: What is 'forward declaration' and the difference between 'typedef struct X' and 'struct X'?
body: <p>I am a beginner in C programming and I know the difference between <code>struct</code> type declaration and <code>typedef</code> struct declaration. I came across to know an answer saying that if we define a <code>struct</code> like:</p>
  
  <pre><code>typedef struct { 
      some members;
  } struct_name;
  </code></pre>
  
  <p>Then it will be like providing an alias to an anonymous struct (as it is not having a tag name). So it can't be used for forward declaration. I don't know what the <em>forward declaration</em> means.</p>
  
  <p>Also, I wanted to know that for the following code:</p>
  
  <pre><code>typedef struct NAME { 
      some members;
  } struct_alias;
  </code></pre>
  
  <p>Is there any difference between <code>NAME</code> and <code>struct_alias</code>? Or are both equal as 
  <code>struct_alias</code> is an alias of  struct NAME ? </p>
  
  <p>Furthermore, can we declare a variable of type <code>struct NAME</code> like these:</p>
  
  <pre><code>struct_alias variable1;
  </code></pre>
  
  <p>and/or like:</p>
  
  <pre><code>struct NAME variable2;
  </code></pre>
  
  <p>or like:</p>
  
  <pre><code>NAME variable3; 
  </code></pre>