填空题
以下程序段打开文件后,先利用fseek函数将文件位置指针定位在文件末尾,然后调用ftell函数返回当前文件的具体位置,从而确定文件长度,请填空。
FILE*myf;long fl;
myf=
【20】
("test.t","rb”);
fseek(myf,() SEEK_END) ;fl+ftell(myf);
fclose(myf);
printf("%ld\n",fl);
【参考答案】
fopen
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
填空题
下面的程序可对指定字符串中的字符串进行从大到小排序、请将程序填完整。 (注:程序采用了冒泡排序算法) #include<stdio.h> #include<string.h> main() char*str= ABCDabcd ,temp; int n,i; n=strlen(str); while(n->1) for(i=0;i<n;i++ if(str[i]<str[i+1]) temp= 【17】 ; str[i]=str[i+1]; 【18】 =temp; printf( 【19】 );
点击查看答案&解析
填空题
若有定义语句char s [100],d[100];int j=0,i=0;且s中已赋字符串,请填空以实现拷贝。 (注:不使用逗号表达式) white(s[i])d[j]= 【15】 ;j++; d[j]=0;
点击查看答案&解析
相关试题
若有如下结构体说明: structSIRU int a...