自考365-自考学历培训

笔记串讲

自考“高级语言程序设计”习题答案详解(52)

2007-09-04 10:51    

免费课

  8.3 程序分析题

  1.读程序,写功能。

  # include

  # include

  main()

  { FILE *f1,* f2;

  int k;

  if(( f1= fopen(“c:\\tc \\ pl.c”,“r” )== NULL)

  { printf(“Can not open file! \n”);

  exit(0);

  }

  if((f2= fopen(“a:\\ pl.c”,“w” ))== NULL)

  { printf(“Can not open file! \n” );

  exit(0) ;

  }

  for( k=1;k<=l000;k++)

  { if( feof(f1)) break;

  fputc( fgetc(f1),

分享到:
小自考
你可能喜欢
相关问答
更多课程推荐
全国自考网