若有定义FILE*fp,则打开与关闭文件的命令是() A: fopen(fp),fclose(fp) B: fopen(fp,“w”),fclose(fp) C: open(fp),close(fp) D: open(fp,“W”),close(fp)
若有定义FILE*fp,则打开与关闭文件的命令是() A: fopen(fp),fclose(fp) B: fopen(fp,“w”),fclose(fp) C: open(fp),close(fp) D: open(fp,“W”),close(fp)
以只读方式打开一个已存在的文本文件ab.txt,以下选项中正确的是______。A. FILE *fp;fp=fopen("ab.txt","a");B. FILE *fp;fp=fopen("ab.txt","w");C. FILE *fp;fp=fopen("ab.txt","r");D. FILE *fp;fp=fopen("ab.txt","rb+"); A: FILE *fp;fp=fopen("ab.txt","a"); B: FILE *fp;fp=fopen("ab.txt","w"); C: FILE *fp;fp=fopen("ab.txt","r"); D: FILE *fp;fp=fopen("ab.txt","rb+");
以只读方式打开一个已存在的文本文件ab.txt,以下选项中正确的是______。A. FILE *fp;fp=fopen("ab.txt","a");B. FILE *fp;fp=fopen("ab.txt","w");C. FILE *fp;fp=fopen("ab.txt","r");D. FILE *fp;fp=fopen("ab.txt","rb+"); A: FILE *fp;fp=fopen("ab.txt","a"); B: FILE *fp;fp=fopen("ab.txt","w"); C: FILE *fp;fp=fopen("ab.txt","r"); D: FILE *fp;fp=fopen("ab.txt","rb+");
可将文件位置指针指向文件尾部的操作有( )。 A: fseek(fp, 0, 2); B: rewind(fp); fseek(fp, ftell(fp), 2); C: fseek(fp, 0, 1); D: rewind(fp); fseek(fp, ftell(fp), 0);
可将文件位置指针指向文件尾部的操作有( )。 A: fseek(fp, 0, 2); B: rewind(fp); fseek(fp, ftell(fp), 2); C: fseek(fp, 0, 1); D: rewind(fp); fseek(fp, ftell(fp), 0);
执行以下程序后,test.txt文件的内容是【 】。(若文件能正常打开) #include main() {FILE * fp; char*sl="Fortran",*s2="Basic"; if((fp=fopen("test.txt","wb"))==NULL) {printf("Can’t open test.txt file\n");exit(1);} fwrite(sl,7,1,fp);/*把从地址sl开始的7个字符写到fp所指文件中*/ fseek(fp,0L,SEEK_SET);/*文件位置指针移到文件开头*/ fwrite(s2,5,1,fp); fclose(fp); } A: Basican B: BasicFortran C: Basic D: FortranBasic
执行以下程序后,test.txt文件的内容是【 】。(若文件能正常打开) #include main() {FILE * fp; char*sl="Fortran",*s2="Basic"; if((fp=fopen("test.txt","wb"))==NULL) {printf("Can’t open test.txt file\n");exit(1);} fwrite(sl,7,1,fp);/*把从地址sl开始的7个字符写到fp所指文件中*/ fseek(fp,0L,SEEK_SET);/*文件位置指针移到文件开头*/ fwrite(s2,5,1,fp); fclose(fp); } A: Basican B: BasicFortran C: Basic D: FortranBasic
执行以下程序后,test.txt文件的内容是(若文件能正常打开)______。#includemain() FILE *fp; char *s1="Fortran",*s2="Basic"; if((fp=fopen("test.txt","wb"))==NULL) printf("Can′t open test.txt file\n");exit(1); fwrite(s1,7,1,fp); /*把从地址s1开始的7个字符写到fp所指文件中*/ fseek(fp,0L,SEEK_SET); /*文件位置指针移到文件开头*/ fwrite(s2,5,1,fp); fclose(fp); A: Basican B: BasicFortran C: Basic D: FortranBasic
执行以下程序后,test.txt文件的内容是(若文件能正常打开)______。#includemain() FILE *fp; char *s1="Fortran",*s2="Basic"; if((fp=fopen("test.txt","wb"))==NULL) printf("Can′t open test.txt file\n");exit(1); fwrite(s1,7,1,fp); /*把从地址s1开始的7个字符写到fp所指文件中*/ fseek(fp,0L,SEEK_SET); /*文件位置指针移到文件开头*/ fwrite(s2,5,1,fp); fclose(fp); A: Basican B: BasicFortran C: Basic D: FortranBasic
执行以下程序后,test.txt文件的内容是(若文件能正常打开)()。#include main(){ FILE *fp;char *s1="Fortran",*s2="Basic";if((fp=fopen("test.txt","wb"))==NULL){ printf("Can’’t open test.txt file\n"); exit(1);}fwrite(s1,7,1,fp); /*把从地址s1开始的7个字符写到fp所指文件中*/f seek(fp, 0L,SEEK_SET); /*文件位置指针移到文件开头*/fwrite(s2,5,1,fp);fclose(fp);} A: Basican B: BasicFortran C: Basic D: FortranBasic
执行以下程序后,test.txt文件的内容是(若文件能正常打开)()。#include main(){ FILE *fp;char *s1="Fortran",*s2="Basic";if((fp=fopen("test.txt","wb"))==NULL){ printf("Can’’t open test.txt file\n"); exit(1);}fwrite(s1,7,1,fp); /*把从地址s1开始的7个字符写到fp所指文件中*/f seek(fp, 0L,SEEK_SET); /*文件位置指针移到文件开头*/fwrite(s2,5,1,fp);fclose(fp);} A: Basican B: BasicFortran C: Basic D: FortranBasic
执行以下程序后,test.txt文件的内容是(若文件能正常打开)______。 #include<stdio.h> main() FILE*fp; char*s1="Fortran",*s2="Basic"; if((fp=fopen("test.txt","wb")==NULL) printf("Can’t open test.txt file\n");exit(1); fwrite(s1,7,1,fp);/*把从地址s1开始的7个字符写到fp所指文件中*/ fseek(fp,0L,SEEK_SET);/*文件位置指针移到文件开头*/ fwrite(s2,5,1,fp); fclose(fp); A: Basican B: BasicFortran C: Basic D: FortranBasic
执行以下程序后,test.txt文件的内容是(若文件能正常打开)______。 #include<stdio.h> main() FILE*fp; char*s1="Fortran",*s2="Basic"; if((fp=fopen("test.txt","wb")==NULL) printf("Can’t open test.txt file\n");exit(1); fwrite(s1,7,1,fp);/*把从地址s1开始的7个字符写到fp所指文件中*/ fseek(fp,0L,SEEK_SET);/*文件位置指针移到文件开头*/ fwrite(s2,5,1,fp); fclose(fp); A: Basican B: BasicFortran C: Basic D: FortranBasic
执行以下程序后,test.txt文件的内容是(若文件能正常打开)______。#include <stdio.h>main(){ FILE *fp; char *s1="Fortran",*s2="Basic"; if((fp=fopen("test.txt","wb"))==NULL) { printf("Can't open test.txt file\n");exit(1);} fwrite(s1,7,1,fp);/*把从地址s1开始的7个字符写到fp所指文件中*/ fseek(fp, 0L,SEEK_SET);/*文件位置指针移到文件开头*/ fwrite(s2,5,1,fp); fclose(fp);} A: Basican B: BasicFortran C: Basic D: FortranBasic
执行以下程序后,test.txt文件的内容是(若文件能正常打开)______。#include <stdio.h>main(){ FILE *fp; char *s1="Fortran",*s2="Basic"; if((fp=fopen("test.txt","wb"))==NULL) { printf("Can't open test.txt file\n");exit(1);} fwrite(s1,7,1,fp);/*把从地址s1开始的7个字符写到fp所指文件中*/ fseek(fp, 0L,SEEK_SET);/*文件位置指针移到文件开头*/ fwrite(s2,5,1,fp); fclose(fp);} A: Basican B: BasicFortran C: Basic D: FortranBasic
定义文件型指针fp的正确格式是() A: int *fp B: file *fp C: FILE fp D: FILE *fp
定义文件型指针fp的正确格式是() A: int *fp B: file *fp C: FILE fp D: FILE *fp
图中下列尺寸中,属于定位尺寸的有()。 A: R10 B: 7 C: 28 D: 92
图中下列尺寸中,属于定位尺寸的有()。 A: R10 B: 7 C: 28 D: 92