Home > Back-end >  C language data structure
C language data structure

Time:10-07

# include
# include
Typedef struct node {struct node * next; int data;
} the node;
Node * creatlist (int n)
{head node * and * q, * p; int i; Head=(*) malloc (sizeof (node)); The head - & gt; data=https://bbs.csdn.net/topics/1; P=the head; for(i=2; i<=n; I++) {q=(*) malloc (sizeof (node)); Q -> data=I; P -> next=q; P=q; } p -> next=head; return head;
}
Int main ()
{int I=0, j; Int n, m, a, [n]. The scanf (" % d % d ", & amp; N, & amp; M); Head node * and * p, * q; The head=creat (n); P=the head; While (i}
Why error, to modify where, solving
  • Related