计算机二级c语言机试02.docVIP

  • 2
  • 0
  • 约小于1千字
  • 约 3页
  • 2017-08-23 发布于河南
  • 举报
void fun(char *filename, STU n) { FILE *fp; /**********found**********/ fp = fopen(filename, rb+); /**********found**********/ fseek(fp, -(long)sizeof(STU), SEEK_END); /**********found**********/ fwrite(n, sizeof(STU), 1, fp); fclose(fp); } NODE *Creatlink(int n, int m) { NODE *h=NULL, *p, *s; int i; /**********found***********/ p=(NODE*)malloc(sizeof(NODE)); h=p; p-next=NULL; for(i=1; i=n; i++) { s=(NODE *)malloc(sizeof(NODE)); s-data=rand()%m; s-next=p-next; p-next=s; p=p-next; } /**********found***********/ return h; } int fun( char *s) {int i,n=0,flag=0; for(i=0;s[i]!=\0;i++) if(s[i]== ) flag=0; else if((s[i]=as[i]=z)flag==0) {n++;flag=1;} return n; }

文档评论(0)

1亿VIP精品文档

相关文档