学历改变命运
24小时客服:4008135555/010-82335555
当前位置:首页 > 笔记串讲 > 自考“高级语言程序设计”习题答案详解(52

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

2007年09月04日    来源:   字体:   打印

  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),

关闭