label
stringlengths
1
2
index
stringlengths
1
5
code
stringlengths
87
8.24k
31
15400
struct student { char num[50]; char name[20]; char sex; int year; char score[10]; char add[50]; struct student *next; }; int n; struct student *Create() { struct student *head; struct student *p1=NULL; struct student *p2=NULL; n = 0; p1 = (struct student *)malloc(LEN); p2 = p1; head = NULL; ...
31
15401
struct student { char a[100]; struct student *next; }; int n; void main() { struct student *head; struct student *p1,*p2; n=0; p1=p2=(struct student *)malloc(L); gets(p1->a); head=NULL; while(strcmp(p1->a,"end")!=0) { n=n+1; if(n==1)head=p1; else p2->next=p1; p2=p1; p1=(struct student *)malloc(L); ...
31
15402
struct student { char inf[200]; struct student *prev; }; struct student *creat() { struct student *p1,*p2,*head; p1=p2=(struct student *)malloc(sizeof(struct student)); gets(p1->inf); p1->prev=0; while(p1->inf[0]!='e') { p2=p1; p1=(struct student *)malloc(sizeof(struct student)); gets(p1->inf); p1->prev...
31
15403
struct stu { struct stu *next; char a[100]; }; void print(struct stu*p,int n) { if(n>0) { printf("%s",p->a); printf("\n"); print(p->next,n-1); } } int main() { int n=1,i,m=100000; struct stu *p1,*p2; p1=(struct stu*)malloc(LEN); gets(p1->a); for(i=0;i<m;i++) { p2=(struct stu*)malloc(LEN); gets(...
31
15404
struct student { char num[20]; char name[20]; char sex; int age; char score[20]; char add[20]; struct student *next; }; void main() { struct student *p1,*p2; p1=p2=(struct student *)malloc(sizeof(struct student)); p1->next=NULL; while(1) { scanf("%s",p1->num); if(strcmp(p1->num,"end")!=0) { scanf(...
31
15405
char a[]="end"; struct student { struct student *last; char num[50]; char name[50]; char sex; int age; char grade[50]; char address[50]; struct student *next; }; struct student *Appendnewnode() { struct student *head=NULL, *newnode, *thisnode,*end; int i=0; do { newnode=(struct student *)malloc(sizeof(...
31
15406
struct student { char id[400]; struct student *pre; }; int main() { int i=1,n=0; struct student a[1000],*head,*p; do { gets(a[i].id); i++; n++; } while(a[i-1].id[0]!='e'); head=&a[n-1]; for(i=n-1;i>=2...
31
15407
int n; struct student {char string[10000]; struct student *next; }; struct student *create(void) { struct student *tail,*p1,*p2,*head; n=0; p1=p2=(struct student *)malloc(Len); gets(p1->string); tail=NULL; while(strcmp(p1->string,"end")!=0) { n=n+1; if(n==1) { tail=p1; p1->ne...
31
15408
struct student { char id[15]; char name[20]; char sex; int age; char grade[20]; char add[20]; struct student *next; }; struct student *set(void) { struct student *head,*p1,*p2; head=(struct student *)malloc(LEN); p1=head; p2=head; scanf("%s%s %c %d %s %s",h...
31
15409
struct a { struct a *back; char a[20]; char b[20]; char c; char d[20]; char e[20]; char f[20]; struct a *next; }; int main() { struct a *pHeader,*pEnd,*p1; struct a *p; pHeader=(struct a*)malloc(sizeof(struct a)); pHeader->back=NULL; p1=pHeader; for(;;) { p=(struct a*)malloc(sizeof(stru...
31
15410
int main() { struct stu{ char a[20]; char b[30]; char c; int d; char e[6]; char f[20]; struct stu *be; }; int n=0; struct stu *head=NULL,*p1,*p2; p2=p1=(struct stu *) malloc(LEN); scanf("%s",p1->a); while ( strcmp(p1->a,"end") ) { if(n) p1->be=p2; else p1->be=NULL; n++; scanf("%s %c %d %s...
31
15411
struct student { char xuehao[200]; struct student *next; }; struct student *create(n) { struct student *p1,*p2,*head; p1=p2=(struct student*)malloc(sizeof(struct student)); p1->next=0; gets(p1->xuehao); while(p1->xuehao[0]!='e') { p2=p1; p1=(struct student*)malloc(sizeof(struct student)); p1->next=p2; g...
31
15412
struct student { char information[200]; struct student *next; }; struct student *creat(void) { int n=0; struct student *head; struct student *p1,*p2; p1=(struct student *)malloc(LEN); gets(p1->information); p1->next=NULL; p2=p1; do { p1=(struct student *)malloc(LEN); gets(p1->information); if(str...
31
15413
struct Stu { char num[20]; char name[50]; char sex; int age; char mark[50]; char add[50]; struct Stu *link; }; void main() { struct Stu *p1,*p2; p1=(struct Stu *)malloc(LEN); p2=p1; scanf("%s",p1->num); p1->link=NULL; while(strcmp(p1->num,"end")!=0) { scanf("%s %c %d %s %s",p1->name,&p1->sex,&p1->age...
31
15414
struct student { char s[100]; struct student *next; }; int n; struct student *creat( ) { struct student *head; struct student *p1,*p2; n=0; p1=p2=(struct student*)malloc(len); gets(p1->s); head=0; while(strcmp(p1->s,"end")!=0) { n++; if(n==1)head=p1; else p1->next=p2; p2=p1; p1=(struct student*)mall...
31
15415
int n=0; struct student { char s[200]; struct student *next; }; struct student *creat() { char k[200]; struct student *p,*head; head=p=(struct student *)malloc(LEN); while(1) { gets(k); if(!(strcmp(k,"end"))) break; else { if(n==0) ...
31
15416
struct student { char num[20]; char name[21]; char sex; int age; char score[20]; char address[21]; struct student *next; }; int n; struct student *create(void) { struct student *head; struct student *p1,*p2; n=0; p1=p2=(struct student *)malloc(length); scanf("%s",p1->num); head=null; while(strcmp(p1->...
31
15417
struct stu { char infor[1000]; struct stu *next; } *p1,*p2; struct stu *creat(void) { struct stu *head=NULL; p2=p1=(struct stu*)malloc(sizeof(struct stu)); gets(p1->infor); while(strcmp(p1->infor,"end")) { if(head==NULL) head=p1; else p2->next=p1;p2=p1; p1=(struct stu*)malloc(sizeof(struct stu)); g...
31
15418
struct s { char a[100]; char b[100]; char c; int d; char e[100]; char f[100]; struct s *t; }k[1000]; int n; int main(int argc, char *argv[]) { int i; struct s *head,*p; for(i=0;;i++) { scanf("%s",k[i].a); if(strcmp(k[i].a,"end")==0) break; scan...
31
15419
char info[1000][1000]; int main() { int k=0; while(1) { cin.getline(info[k],999); if (info[k++][0]=='e') break; } k-=2; for (;k>=0;k--) { cout<<info[k]<<endl; } return 0; }
31
15420
struct student { char str[100]; struct student *next; }; struct student *creat(void) {struct student *head; struct student *p1,*p2,*p3; p1=p2=p3=(struct student *)malloc(LEN); gets(p1->str); while(strcmp(p1->str,"end")!=0) { p1=(struct student *)malloc(LEN); gets(p1->str); head=p1; p1->next=p2; ...
31
15421
struct student { char id[100],name[100],sex[2]; char sco[100]; int age; char pos[100]; struct student *pre; }; int n; struct student*creat(void) { struct student *head; struct student *p1,*p2; n=0; p1=p2=(struct student*)malloc(LEN); scanf("%s",&p1->id); if(strcmp(p1->id,"end")!=0) { scanf("%s%s%d%s%s",&p...
31
15422
struct student { char info[100]; struct student *next; }; int n; struct student*creat(void) {struct student *head,*p1,*p2; p1=p2=(struct student*)malloc(LEN); gets(p1->info); p1->next=null; while(strcmp("end",p1->info)!=0) {head=p1; p1=(struct student*)malloc(LEN); p1->next=p2; p2=p1; gets(p1-...
31
15423
void main() { int n; struct student { char num[50]; char name[100]; char sex; int age; char score[20]; char add[100]; struct student *before; }*thisNode,*newNode; for(n=1;;n++) { newNode=(struct student *)malloc(sizeof(struct student)); if(newNode==NULL) { printf("error!"); exit(-1); }...
31
15424
struct stu { char num[1000]; struct stu*next; }; struct stu*f() { struct stu*head; struct stu*p,*q; p=q=0; p=(struct stu*)malloc(l); p->next=q; gets(p->num); q=p; while(1) { p=(struct stu*)malloc(l); p->next=q; q=p; gets(p->num); if(p->num[0]=='e') break; } head=p; return(head); } void y(struct ...
31
15425
struct node { char str[100]; struct node *next; }; void main() { struct node *head=NULL, *element; char str[100]; gets(str); while(strcmp(str,"end")) { element=(struct node *)malloc(sizeof(struct node)); strcpy(element->str,str); element->next=head; head=element; gets(str); } while(head!=NULL) { ...
31
15426
struct stu {char num[50]; char name[50]; char gentle; int age; int score; char add[50]; struct stu *next; }; int n; struct stu *creat(void) { struct stu *head,*p1,*p2; n=0; p1=p2=(struct stu *)malloc(sizeof(struct stu)); gets(p1->num); head=NULL; while(strcmp(p1->num,"end")!=0) { n++; if(n==1) p1->next...
31
15427
struct student { char num[20]; char name[20]; char sex; int age; char score[20]; char adress[20]; struct student *next; }; int n; struct student *input(void) { struct student *p,*q,*head; int n=0; p=q=(struct student *)malloc(sizeof(struct student)); scanf("%s %s %c %d %s %s\n",p->num,p->name,&p->sex,&p->age...
31
15428
struct STUDENT { struct STUDENT *former; char num[20]; char name[20]; char sex; int age; float score; char address[20]; struct STUDENT *next; }; struct STUDENT stu; void main() { struct STUDENT *head,*p1,*p2,*p3; head=p1=p2=&stu; p3=NULL; for (;;) { scanf ("%s",p1->num); if (p1->num[0]=='e') { ...
31
15429
struct student { char a[200]; struct student *next; }; struct student *creat () { struct student *p1,*p2,*head; int n=0; p1=(struct student*)malloc(sizeof (struct student)); gets(p1->a); p2=p1; head=NULL; while(strcmp(p1->a,"end")!=0) { n=n+1; if(n==1) head=p1; else p2->next=p1; p2=p1; p1=(stru...
31
15430
struct student { char NO[20]; char name[20]; char sex; int age; char score[20]; char add[20]; struct student *prev; }; void main() { struct student *END; struct student *p1,*p2; p1=p2=(struct student*)malloc(LEN); scanf("%s %s %c %d %s %s",&p1->NO,&p1->name,&p1->sex,&p1->age,&p1->score,&p1->add); p1->prev=0...
31
15431
struct student { char infor[100]; struct student *next; }*p1,*p2; struct student *creat(void) { struct student *head; head=0; p1=0; p2=0; while(1) { p1=(struct student *)malloc(LEN); gets(p1->infor); if(strcmp(p1->infor,"end")==0) break; if(head==0) head=p1; else p2->next=p1; p2=p1; } p2-...
31
15432
struct student { char num[20]; char name[20]; char sex; int age; char score[10]; char add[30]; struct student *next; }*p1,*p2; struct student *input(void) { char temp[100]={0}; struct student *head=NULL; while(gets(temp)) { if(strcmp(temp,"end")==0)break; p1=(struct student *)malloc(sizeof(...
31
15433
struct student//????? { char num[20]; char name[20]; char sex; int age; char score[20]; char add[30]; struct student *next; }; struct student *creat(void)//????????CREAT????? { struct student *p1,*p2; p1=p2=(struct student *)malloc(LEN);//???????? p2->next=NULL; scanf("%s",p1->num);//??num while(strcm...
31
15434
struct stu { char no[20],sx,nm[30],rm[20],mk[10]; int age; struct stu* next; }; main() { struct stu *p1,*p2,*head; int i; void output(struct stu *p,struct stu* p2); for(i=0;;i++) { p1=(struct stu*)malloc(L); if(i==0)head=p1; scanf("%s",p1->no); if(strcmp(p1->no,"end")==0)break; ...
31
15435
/* ????? ?????????????????????????? ???????????????????????? ????????????????????????????????????????????????????? */ //???struct Student??????????????? typedef struct Stu{ char stu_id[20]; //?? char name[20]; //?? char gender; //?? int age;...
31
15436
struct stdnt { char num[20]; char name[20]; char gndr; int age; double score; char adrs[30]; struct stdnt* next; }; int n; struct stdnt *creat() { struct stdnt *p1,*p2=0; p1=(struct stdnt*)malloc(LEN); for (n=0;;n++) { if (n==0) p1->next=0; scanf("%s",p1->num); if (strcmp(p1->num,"end")==0) br...
31
15437
struct student {char num[20]; char name[20]; char sex; int age; char grade[20]; char address[20]; struct student *next; }; int n; struct student *create(void) { struct student *head; struct student *p1,*p2; p1=p2=(struct student*)malloc(LEN); scanf("%s %s %c %d %s %s",&p1->num,&p1->name,&p1->sex,&p1->age,&p...
31
15438
/*?? ?? ?? ?? ?? ??*/ struct student { struct student *pre; char num[100]; char name[20]; char sex[2]; char age[10]; char score[10]; char ad[100]; struct student *next; }; void main() { int n=0; struct student *end,*p1,*p2,*p; p1=(struct student *)malloc(LEN); scanf("%s",p1->num); while(strcmp(p1->num,"end...
31
15439
struct student { char num[10]; char name[20]; char sex[5]; int age; char score[20]; char addr[20]; struct student *next; }; struct student *head; struct student *input() { struct student *p1,*p2; p1=p2=(struct student *)malloc(sizeof(struct student)); scanf("%s",p1->num); p2->next=NULL; while(strcmp(p1-...
31
15440
struct stu { char xuehao[20]; char xingming[30]; char xingbie; int nianling; char defen[10]; char dizhi[20]; struct stu *last; }; main() { struct stu a[10000],*p; int i=0; a[0].last=NULL; for(;;i++) { scanf("%s",a[i].xuehao); if(a[i].xuehao[0]=='e') break; scanf("%s %c %d %s %s",a[i].xingming,&a[i].xingbie,&a[...
31
15441
struct student {char num[10]; char name[20]; char sex; int age; char score[10]; char adr[30]; struct student *previous; }; void main() {struct student *end,*head; struct student *p1,*p2, *p; /*p1=(struct student *)malloc(LEN);*/ p2=head=NULL; while(1) {p1=(struct student*)malloc(LEN); scanf("%s",&p1->num); if (strcmp(p...
31
15442
struct s{ char xuehao[20]; char xingming[20]; char xingbie; int age; char score[20]; char add[20]; struct s *next; }; int main(){ struct s *A(void); struct s *head,*p; head=A(); p=head; if(head!=NULL){ while(p->next!=NULL){ printf("%s %s %c %d %s %s\n",p->xuehao,p->xingming,p->xingbie,p->age,p->score,p...
31
15443
struct student {char num[10]; char name[20]; char fm; int age; int score; char add[50]; struct student *next; }; int n; struct student *creat(void) {struct student *head; struct student *p1,*p2; n=0; p1=p2=(struct student*)malloc(LEN); gets(p1->num); head=NULL; while(strcmp(p1->num,"end")!=0) {n=n+1; if(n==1) p...
31
15444
struct student { char c[60]; struct student *next; }; struct student *creat(void) { struct student *head,*p1; p1=(struct student *) malloc(LEN); head=p1; head->next=NULL; gets(p1->c); while(strcmp(p1->c,"end")) { p1=(struct student *) malloc(LEN); gets(p1->c); p1->next=head; head=p1; } return(head); } v...
31
15445
struct stu { char xh[20],mz[20],xb,dz[20],df[20]; int nl; }; int main() { struct stu a[10000]; int n=0,i; char str[4]="end",c; scanf("%s",a[0].xh); while(strcmp(a[n].xh,str)!=0) { scanf("%s",a[n].mz); c=getchar(); scanf("%c",&a[n].xb); scanf("%d",&a[n].nl); scanf("%s",&a[n].df); c=getchar(); scanf...
31
15446
struct student { char num[20]; char name[20]; char sex[5]; char age[5]; char score[10]; char address[20]; struct student *next; }; int main() { struct student *head,*p1,*p2,*end; char c; int i1,n1; p1=p2=(struct student*)malloc(sizeof(struct student)); scanf("%s%s%s%s%s",&p1->num,&p1->name,&p1->sex,&p1->age...
31
15447
struct student //????? { char id[10]; char name[20]; char gender; int age; char score[10]; char address[20]; struct student *next, *up;//next?????????,up??????????????????? }; int main() { struct student *head, *tail, *p, *r,*q; p=r=head=(struct student *)malloc(len);//head??????? p->up=NULL;//??????up????n...
31
15448
struct student{ char num[20]; char name[20]; char sex; int old; float score; char add[15]; struct student *next; }; int main() { struct student *p1,*p2; p1=(struct student *)malloc(len); p1->next=NULL; scanf("%s",p1->num); while(strcmp(p1->num,"end")!=0){ scanf("%s %c %d %f %s",p1->name,&p1->sex,&p1->...
31
15449
struct node; struct node { char id[len]; char name[len]; char sexual[len]; char age[len]; char score[len]; char addr[len]; struct node* next; struct node* pre; }; char end[len]="end"; int main(){ struct node* p; p=(struct node*)malloc(sizeof(struct node)); p->pre=NULL; ...
31
15450
struct student { char num[30];//???????end??strcpy?? char name[30]; char sex; int age; char score[30];//??????????? char add[30]; struct student *next; }*p1,*p2;//??????????? int n;//???? struct student *creat(void) //???? { struct student *head=NULL; char temp[30]={"end"}; n=0; p1=p2=(s...
31
15451
struct student { char _no[9]; char name[20]; char sex[1]; int age; float score; char add[20]; struct student *next; }; int n; void main() { int i; struct student *p1; struct student *p2; struct student *head; n=0; p1=p2=(struct student*)malloc(LEN); head=NULL; for(n=0;;) { n=n+1; p1=(struct student*...
31
15452
struct stu { char a[100]; struct stu * next; }; struct stu * create() { struct stu *head,*p1,*p2; p2=p1=(struct stu *) malloc (sizeof(struct stu)); gets(p1->a); p1->next=0; while(!(p1->a[0]==101&&p1->a[1]==110&&p1->a[2]==100)) { p1=(struct stu *) malloc (sizeof(struct stu)); gets(p1->a); p1->next=p2; p2...
31
15453
struct student {char info[100]; struct student *next1; struct student *next2; }; int n,i; struct student *creat(void) { struct student *p1,*p2,*p3; n=0; p3=p2=p1=(struct student*)malloc(LEN); gets(p1->info); while(p1->info[0]!='e') { n+=1; if(n==1){p2->next1=p1; p2->next2=NULL;} else {p2->next1=p1; p2->next2=p3;} p3=p2...
31
15454
char str[]={"end"}; struct student { char num[100]; char name[100]; char sex; int age; char score[100000]; char add[100]; struct student *next; }; struct student *create() { struct student *head,*p1,*p2; p1=(struct student*)malloc(Len); scanf("%s %s %c %d %s %s",p1->num,p1->name,&p1->sex,&p1->age,p1->score,p1...
31
15455
struct student { char a[100]; char b[100]; char c; int d; char e[100]; char f[100]; struct student *t; }k[1000]; int n; int main() { int i; struct student *head,*p; for(i=0;;i++) { scanf("%s",k[i].a); if(strcmp(k[i].a,"end")==0) break; scanf(" ...
31
15456
struct Student { char number[100]; char name[100]; char sex; int age; char score[20]; char address[100]; struct Student *next; struct Student *front; }; int n; void main() { struct Student*p1,*p2; struct Student*head; n=0; p1=p2=(struct Student*)malloc(LEN); scanf("%s %s %c%d%s%s",p1->number,p1->name,&p1->sex,&p1...
31
15457
void main() { struct student { char stu[100]; struct student *next; struct student *prev; }*head,*p1,*p2,*p; int n; p1=p2=(struct student *)malloc(LEN); gets(p1->stu); p1->prev=NULL; while(strcmp(p1->stu,"end")!=0) { p1=(struct student*)malloc(LEN); p1->prev=p2; gets(p1->stu); p2->next=p1; p2=p...
31
15458
struct Student { char num[50]; char name[50]; char x; int age; float score; char ad[50]; struct Student *next; }; struct Student *create(void) { struct Student *head,*p1,*p2; int n=0; char end[5]="end\0"; p1=(struct Student*)malloc(LEN); p2=p1; scanf("%s",p1->num); scanf("%s %c%d%f%s",p1->name,&p1->x,...
31
15459
void main() { struct student { char str[100]; struct student *before; struct student *next; }*head,*p1,*p2; p1=(struct student *)malloc(sizeof(struct student)); p1->before=NULL; head=p1; while(strcmp(p2->str,"end")!=0) { gets(p1->str); p2=p1; p1=(struct student*)malloc(sizeof(struct student)); p1->be...
31
15460
struct stu { char num[20]; char name[20]; char sex; int age; double x; char add[20]; struct stu *next; }; struct stu *creat() { struct stu *head,*p1,*p2; p1=(struct stu *)malloc(LEN); scanf("%s %s %c %d %lf %s ",&p1->num,&p1->name,&p1->sex,&p1->age,&p1->x,&p1->add); p2=p1;head=p1; p1->next=NULL; while(1)...
31
15461
struct student { char num[10]; char name[20]; char sex; int age; char score[20]; char address[50]; struct student *next; }; void main() { struct student *p,*head,*q; p=(struct student*)calloc(1000,sizeof(struct student)); int i,k; for(i=0;;i++) { scanf("%s",p[i].num); if(p[i].num[0]=='e') br...
31
15462
struct stu {char a[100]; struct stu *next; }; int main() {struct stu *head,*p1,*p2; head=(struct stu *)malloc(sizeof(struct stu)); p1=head; p2=head; p1->next=0; while(1) { gets(p1->a); if(strcmp(p1->a,"end")==0) break; else head=p1; p1=(struct stu *)malloc(sizeof(struct stu)); p1->next...
31
15463
main() { int doit(int a); doit(1); } int doit(int r) { char a[20],b[20],c[20],d[20],e[20],f[20]; scanf("%s",a); if (a[0]!='e') { scanf("%s",b);scanf("%s",c);scanf("%s",d);scanf("%s",e);scanf("%s",f); doit(1);} else return 0; printf("%s %s %s %s %s %s\n",a,b,c,d,e,f); }
31
15464
struct student{ struct student *pre; char No[10]; char name[20]; char sex; int age; float grade; char address[20]; struct student *next; }; struct student *create(){ struct student *head,*p1,*p2,*h,*p; p1=(struct student *)malloc(sizeof(struct student)); scanf("%s",p1->No); if(p1->No[0]=='e'){ fr...
31
15465
main() { struct a { char s[100]; struct a *next; }; int len=sizeof(struct a),n=0; struct a *p1,*p2,*head,*p; p1=p2=(struct a *)malloc(len); head=NULL; gets(p1->s); while(strcmp(p1->s,"end")!=0) { n++; if(n==1) head=p1; else p1->next=p2; p2=p1; p1=(struct a *)malloc(len); gets(p1->s); } ...
31
15466
struct Student { char num[20]; char name[20]; char sex; int age; char score[20]; char add[20]; struct Student *next; }; int n; struct Student *creat() { struct Student *head,*p1,*p2; p1=p2=(struct Student *) malloc(LEN); scanf("%s",&p1->num); while(p1->num[0]!='e') { n++; scanf("%s %c %d %s %s",&p1-...
31
15467
int main() { struct student { char imfor[100]; struct student *early; }; int m; struct student *p1,*p2,*last,*p; p1=p2=(struct student *)malloc(sizeof(struct student)); gets(p1->imfor); p1->early=0; for (m=1;m<1000;m++) { p1=(struct student * )malloc(sizeof(struct student)); p1->early=p2; p2=p1; ...
31
15468
struct student { char num[20]; char name[20]; char sex; int age; double score; char address[20]; struct student *next; struct student *former; }; main() { struct student *p,*p1,*p2,*header; header=(struct student *)malloc(sizeof(struc...
31
15469
struct stru { struct stru *pre; char msg[200]; struct stru *next; }*head, *p,*q,*end; void creat() { char temp[200]; p=q=(struct stru *)malloc(LEN); head=p; head->pre=NULL; gets(p->msg); while(1) { gets(temp); if(strcmp(temp,"end")!=0) {p=(struct stru *)malloc(LEN); strcpy(p->msg,temp); p->pre=q; ...
31
15470
struct student { char id[20]; char name[20]; char sex; int age; char score[20]; char address[20]; struct student *next; struct student *pre; }; struct student *create(void) { struct student *head,*p1,*p2,*end; p1=(struct student *)malloc(LEN); scanf("%s %s %c %d %s %s",p1->id,p1->name,&p1->sex,&p1->age,p1->...
31
15471
int n; struct student { char str[100]; struct student *pre; } *p1, *p2; struct student *create(void) { struct student *last, *head; p1 = p2 = (struct student *)malloc(sizeof(struct student)); //???? gets(p1->str);//????? head=NULL; n=0; while (strcmp(p1->str,"end")!=0) { n=n+1; //?????? if (n...
31
15472
struct stu { char num[10]; char name[20]; char sex; int age; float mark[6]; char add[10]; struct stu *next; }; int n; struct stu *creat(void) { struct stu *head; struct stu *p1,*p2; n=0; p1=p2=(struct stu *)malloc(sizeof(struct stu)); scanf("%s",p1->num); if(strcmp(p1->num,"end")==0) { free(p1); head...
31
15473
struct stu { char num[111]; char name[111]; char gender; int age; char score[11111]; char add[111]; struct stu *next; }; int n; struct stu *creat() { struct stu *head; struct stu *p1,*p2; n=0; p1=(struct stu *)malloc(L); scanf("%s",p1->num); if(strcmp(p1->num,"end")) scanf("%s %c %d %s %s",p1->...
31
15474
struct student { char xuehao[20]; char name[30]; char sex; int age; char score[20]; char adress[40]; struct student *next; }; void insert (struct student *pheader) { struct student *p; p=(struct student *)malloc(sizeof(struct student)); p->next=pheader->next; pheader->next=p; } main() { struct student *phea...
31
15475
int main() { char s[1000][100]; int i; for (i=0,gets(s[i]); s[i][0]!='e'; gets(s[i])) i++; for (i--;i!=-1; i--) puts(s[i]); return 0; }
31
15476
struct student { char str[50]; struct student *next; }; struct student *creat() { struct student *head=NULL,*p1,*p2; p1=p2=(struct student*)malloc(Len); gets(p1->str); while(strcmp(p1->str,"end")!=0) { ...
31
15477
char ex[4]={"end"}; struct student { char n[100]; struct student *next; }; void main() { int n=0; struct student *a=NULL,*b=NULL; struct student *head,*p1,*p2; head=NULL; p1=(struct student*)malloc(LEN); p2=NULL; gets(p1->n); while(strcmp(ex,p1->n)!=0) { p1->next=p2; p2=p1; p1=(struct student*)malloc(L...
31
15478
typedef struct Student { char ALL[100]; struct Student *pNext; struct Student *pPrev; }Stu; int main(void) { Stu *pRoot=(Stu *)malloc(sizeof(Stu)); Stu *pNow=pRoot; pRoot->pPrev=NULL; for(;;) { gets(pNow->ALL); if(strcmp("end",pNow->ALL)) { pNow->pNext=(Stu *)malloc(sizeof(Stu)); pNow->pNext->pPrev=...
31
15479
struct Student { char num[20]; char name[20]; char sex; int age; char score[20]; char add[20]; struct Student *next; }; int n=0; struct Student*create() { struct Student*head; struct Student*p1,*p2; n=0; p1=p2=(struct Student*)malloc(sizeof(struct Student)); scanf("%s %s %c %d %s %s",p1->num,p1->name,&p1->s...
31
15480
struct student { char num[20]; char name[20]; char sex; int age; double score; char address[20]; struct student *next; struct student *former; }; main() { struct student *p,*p1,*p2,*header; header=(struct student *)malloc(sizeof(struc...
31
15481
void main() { struct student { char a[100]; struct student * next; }; struct student * head; struct student * p1,* p2; p1=p2=(struct student * )malloc(LEN); gets(p1->a); p1->next=0; while(strcmp(p1->a,"end")) { head=p1; p2=p1; p1=(struct student * )malloc(LEN); gets(p1->a); p1->next=p2; } for(p1...
31
15482
int main() { struct student { char No[9]; char name[20]; char sex; int age; char score[8]; char add[20]; struct student *next,*last; }; struct student *p,*head,*tail; p=(struct student*)malloc(sizeof(struct student)); head=p; head->last=NULL; do { scanf("%s",p->No); if(p->No[0]=='e') { ...
31
15483
struct node { char no[20],name[20],sex,ad[20],score[20]; int age; struct node *next; }*start=NULL,*p; int main() { struct node * temp; while(1==1) { temp=(struct node *)malloc(sizeof(struct node)); scanf("%s",temp->no); if(strcmp(temp->no,"end")==0) break; scanf(" %s %c %d %s %s",temp->name,&temp->...
31
15484
void main() { struct s { char a[100]; char b[100]; char c; int d; float e; char f[100]; struct s *next; }; struct s *p1,*p2,*head; int i,j,k,m,n,t; p1=p2=(struct s *)malloc(sizeof(struct s)); head=p1=p2;n=1; scanf("%s %s %c %d %f %s",p1->a,p1->b,&p1->c,&p1->d,&p1->e,p1->f); for(i=0;i<10000;i++) ...
31
15485
struct student { char id[100]; char name[100]; char sex; int age; char score[100000]; char address[100]; struct student *next; }; struct student *creat(void) { struct student *head,*p,*q; q=NULL; head=(struct student *)malloc(len); p=head; while(1) { q=p; scanf("%s",&p->id); if(strcmp(p->id,"end")=...
31
15486
char a[3]={'e','n','d'}; struct student { char xuehao[50]; char name[50]; char gender; int age; float score; char add[100]; struct student *next; }; int m; struct student *head; struct student *creat() { struct student *p1,*p2; m=0; p1=p2=(struct student*)malloc(LEN); scanf("%s %s %c %d %f %s",p1->xuehao,...
31
15487
struct student { char num[20]; char name[20]; char x[2]; int age; char score[8]; char add[30]; struct student *next; }; void main() { int i,j; struct student *head,*p1,*p2; p1=(struct student *)malloc(len); head=p1; scanf("%s%s%s%d%s%s",p1->num,p1->name,p1->x,&p1->age,p1->score,p1->add); p1->next=nul...
31
15488
struct stu {char id[16]; char name[32]; char gender; int age; char score[8]; char add[16]; struct stu*next; }; int n; struct stu*creat(void) {struct stu *head,*p1,*p2; n=0; head=NULL; p1=p2=(struct stu*)malloc(sizeof(struct stu)); scanf("%s",p1->id); while(strcmp(p1->id,"end")!=0) {scanf("%s %c %d %s %s",p1...
31
15489
struct Student { char information[200]; struct Student *next; }; int n; struct Student*creat() { struct Student *p1,*p2,*head; n=0; p1=p2=(struct Student *)malloc(LEN); gets(p1->information); head=NULL; while(strcmp(p1->information,"end")!=0) { ...
31
15490
struct stu{ char no[10]; char name[20]; char gene; unsigned int age; float score; char add[20]; struct list *next; }; struct stu *creat() { struct stu *p1=NULL,*p2=NULL,*head; int n=0; do{ p2=p1; p1=(struct stu*)malloc(sizeof(struct stu)); scanf("%s",p1->no); if(*p1->no=='e') { head...
31
15491
struct student { char num[15]; char name[30]; char sex; char age[3]; char grade[10]; char ad[15]; }stu[1000]={0}; int main() { int i=0; while(1) { scanf("%s",stu[i].num); if(stu[i].num[0]=='e') break; else { scanf("%s %c %s %s ...
31
15492
struct student { char info[50]; struct student *p; }; void main() { int m,n,i,j; struct student *p,*head; for(i=0;;i++) { p=DT; if(i==0) p->p=NULL; gets(p->info); if(strcmp(p->info,"end")==0) break; p->p=head; head=p; } for(p=head,j=0;j<i;j++,p=p->p) { puts(p->info); } }
31
15493
struct Student { char number[100]; char name[100]; char sex; int age; char score[20]; char address[100]; struct Student *next; struct Student *front; }; int n; void main() { struct Student*p1,*p2; n=0; p1=p2=(struct Student*)malloc(LEN); scanf("%s %s %c%d%s%s",&p1->number,&p1->name,&p1->sex,&p1->age,&p1->score,&p1...
31
15494
struct a { char num[10]; char name[21]; char sex; int age; float score; char address[12]; struct a*next; }; struct a*create() { struct a*head,*p1; p1=len;p1->next=null;head=p1;strcpy(p1->num,"pp"); while(strcmp(p1->num,"end")) { scanf("%s",p1->num); if(strcmp(p1->num,"end")!=0) { scanf("%s %c %d %f %...
31
15495
struct student {char number[100]; char name[100]; char sex; int age; char score[20]; char address[100]; struct student *next; struct student *front; }; void main() { struct student *p1,*p2; p1=p2=(struct student*)malloc(LEN); p1->front=NULL; scanf("%s",&p1->number); while(p1->number[0]!='e'||p1->number[1]!='n'||p1->nu...
31
15496
int main() { char str[10000][100]; gets(str[0]); int i=0,j; while(str[i][0]!='e') { i++; gets(str[i]); } for(j=i-1;j>=0;j--) printf("%s\n",str[j]); getchar();getchar(); }
31
15497
struct node { int num; char number[20]; char name[20]; char sex[10]; char age[10]; char score[10]; char address[20]; struct node *next; }; struct node * creat(int n); struct node * insert(struct node *head,struct node * q); void list(struct node *head); struct node * fv(struct node * head); int main(void) { s...
31
15498
int n=0; struct student { char id[20]; char name[20]; char sex; int age; char score[20]; char address[20]; struct student* next; }; struct student *creat() { struct student* head,*pf,*ps; pf= (struct student * ) malloc(sizeof(struct student)); ps=pf; scanf("%s",&pf->id); while(pf->id[0]!='e') { n++; scanf...
31
15499
struct Inform { char number[30]; char name[30]; char gender[2]; char age[4]; char score[10]; char address[20]; struct Inform *next; }; int n; struct Inform *creat() { struct Inform *head; struct Inform *p1,*p2; head=NULL; p1=p2=(struct Inform*)malloc(LEN); n=0; sc...