title: Why use dynamic memory allocation(i.e. malloc()) when implementing linked list in c?
body: <p>Okay this question may sound stupid to the amateur programmers . But seriously this is bothering me and a solemn answer to this doubt of mine is welcomed. I have just started to take my first ever course in data structures. And what is bothering me is this:</p>
  
  <p>Assuming C is used,</p>
  
  <pre><code>//Implementing a node
  
  struct Node
  {
       int data;
       struct *Node;
  };
  </code></pre>
  
  <p>Now while creating a node why do we use the dynamic memory allocation technique where we use malloc(). Can't we just create a variable of type ' Struct Node '.
  i.e. something like:</p>
  
  <pre><code>struct Node N1;
   //First node - actually second where !st Node is assumed to be Head.
  
  struct Node *Head = &amp;N1;
  struct Node N2;
  N2.(*Node) = &amp;N1;
  </code></pre>
  
  <p>Well some parts of my code may be incorrect because I am only a beginner and not well versed with C. But by know you may have understood what I basically mean. Why don't we create variables of type Node of an Array of type Node to allocate memory t new nodes why get into the complexity of dynamic memory allocation?</p>