A.300,500
B.30,35
C.300,80
D.300,0
第1题
【说明】
编写程序,生成一个新文本文件,它由一个已知文本文件的所有偶数行组成。要求已知文本文件名和新文本文件名均从键盘输入。请填空完善程序。
【C语言程序】
include<stdio.h>
main()
{
FILE *oldf,*newf;
char ch,fname[20];
int i;
do{
printf("Enter name of existed text file to be read:");
scanf("%s",fname);
if((oldf=fopen(fname,"r"))==NULL)
printf("File %s can't open!\n",fname);
}while(oldf==NULL);
do{
printf("Enter mane of new text file to be written:");
scanf("%s",fname);
if(((1)==NULL)
printf("File %s can't open!\n",fname);
}while((2));
i=1;
while(!feof(oldf))
{
while((ch=fgetc(oldf))!=(3))
{
if(i%2==(4))
fputc(ch,newf);
}
fputc('\n',newf);
(5);
}
fclose(oldf);
fclose(newf);
}
第2题
Residential construction now makes up more than 6% of GDP. This suggests that a 10% drop would shave some 0.6 percentage points off economic growth. A bigger question, however, is how slower prices might affect consumer spending. Experts expect that America's house prices will have stopped rising by the end of the year. Mainly because a flat market will put a brake on residential building, this is expected to reduce GDP growth by about 1.5 percentage points. "Just Reduced" might soon be a fitting label for the whole economy.
第5题
A.0
B.2
C.10
D.25
第8题
A.不可能再访问
B.仍然可以访问
C.能否访问取决于file2的所有者
D.能否访问取决于file2的权限
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!