title: Can multiple linked lists share the same structure?
body: <p>I have many structure for different different linked list, all have different data types variables. Like :</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;conio.h&gt;
  #include &lt;stdlib.h&gt;
  
  struct scorel {
      int no;
      struct scorel *rp;
  };
  struct namel{
      char a[10];
      struct scorel *rp;
      struct namel *dp;
  };
  void main(){
      int i,j,n,m;
      struct namel *temp,*head,*end,**s;
      struct scorel *tmp,*had,*nd;
      clrscr();
      printf("enter no of students");
      scanf("%d",&amp;n);
      end=NULL;
      for(i=0;i&lt;n;i++){
          temp=(struct namel*)malloc(sizeof(struct namel));
          printf("enter name\n");
          scanf("%s",temp-&gt;a);
          temp-&gt;rp=NULL;
          temp-&gt;dp=NULL;
          *(s+i)=temp;
          if(end==NULL){
              end=head=temp;
          }
          else {
              end-&gt;dp=temp;
              end=temp;
          }
          printf("enter no of scores");
          scanf("%d",&amp;m);
          nd=NULL;
          for(j=0;j&lt;m;j++){
              tmp=(struct scorel*)malloc(sizeof(struct scorel));
              printf("enter score\n");
              scanf("%d",&amp;tmp-&gt;no);
              tmp-&gt;rp=NULL;
              if(nd==NULL){
                  nd=had=tmp;
                  temp-&gt;rp=tmp;
              }
              else {
                  nd-&gt;rp=tmp;
                  nd=tmp;
              }
          }
      }
      for(i=0;i&lt;n;i++){
          temp=*(s+i);
          printf("%s--&gt;",temp-&gt;a);
          tmp=temp-&gt;rp;
          while(tmp!=NULL){
              printf("%d--&gt;",tmp-&gt;no);
              tmp=tmp-&gt;rp;
          }
          printf("\n");
      }
      getch();
  }
  </code></pre>
  
  <p>Any <strong>Macro</strong> available for that by which i can use same structure for different different linked list. </p>
  
  <p>I also seen array of linked list,</p>
  
  <pre><code>struct node{
      int data;
      struct node *next;
  }*head[5];
  </code></pre>
  
  <p>But in this only we can use one type of variable.
  I want different different types of variable for every  linked list.</p>