title: Initializing a pointer to a struct with malloc
body: <p>This might be a question with a very simple solution but I can't get my head around it... I'm trying to implement linked list for a school proyect using structures but when I initialize the very first node, malloc seems to make no effect at all</p>
  
  <p>here's my code so far:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;conio.h&gt;
  #include &lt;stdlib.h&gt;
  
  typedef struct Node Node;
  struct Node
  {
      int data;
      Node *next;
  };
  
  void init_List(Node *head, int data)
  {
      head = (Node*)malloc(sizeof(Node));
      if(head == NULL)
      {
          printf("Memory Allocation Error");
          return;
      }
      head-&gt;data = data;
      head-&gt;next = NULL;
  }
  
  int main()
  {
      Node *head = NULL;
      int N;
      printf("N: ");
      scanf("%d", &amp;N);
      init_List(head, N);
      printf("%d", head-&gt;data);
  }
  </code></pre>
  
  <p>whatever number I read to make the first data of my node prints as cero. don't know what could be happening.
  thanks for the help!</p>