#include #includedstdlib.h> typedef struct student{ int hum; char name[20]; char sex; int age; }LIST; LIST*creat

admin2014-01-13  33

问题 #include
  #includedstdlib.h>
  typedef struct student{
  int hum;
  char name[20];
  char sex;
  int age;
  }LIST;
  LIST*create((1))
  {LIST*head=NULL,*newNode,*tail;
  int i=0:
  for(i=0;i  {
  (2);
  printf(”\nlnput the information of student%d(name,nuln,sex,age):”i+1);
  seanf(”%S%d%C%d”,%newNode->name,l-newNode->num,g  一>sex,&newNode->age);
  newNode->next=NULL;
  if(i==0)
  (3);
  else
  tail->next=newNode;
  tail=newNode;
  }
  (4);
}
void 0utputUst(LIST*head)
{LIST*p=head;
while(P!=NUI。L){
printf(”\n%d%s%c O//,d”,p->num,P->name,p->sex,p-age);
(5);
)
}
void main(    )
{
LIST*L:
L=create(10);
OutputIist(L):
}

选项

答案(1)int n (2)DewN0de=(LIST*)malloc(sizeof(LIST)) (3)head=rleviNode (4)returneacl (5)p=p->next

解析
转载请注明原文地址:https://kaotiyun.com/show/Bial777K
0

随机试题
最新回复(0)