执行以下程序后,test.txt文件的内容是(若文件能正常打开) ()。include include 执行以下程序后,test.txt文件的内容是(若文件能正常打开) ( )。#include <stdio.h>#include <stdlib.h>main( ){ FILE * fp; char * s1 = "Fortran" , * s2 = "Basic"; if((fp = fopen( "test. txt" ," wb" )) = = NULL) { prinff( "Can't open test. txt file \n"); exit(1); } fwrite( s1 ,7,1 ,fp); /* 把从地址s1开始到7个字符写到fp所指文件中*/ fseek(fp,OL,SEEK_SET); /*文件位置指针移到文件开头*/ fwrite (s2,5,1,fp); felose (fp);}A.BasieanB.BasieFortranC.BasicD.FortranBasie
执行以下程序后,test.txt文件的内容是(若文件能正常打开) ()。include include
执行以下程序后,test.txt文件的内容是(若文件能正常打开) ( )。#include <stdio.h>#include <stdlib.h>main( ){ FILE * fp; char * s1 = "Fortran" , * s2 = "Basic"; if((fp = fopen( "test. txt" ," wb" )) = = NULL) { prinff( "Can't open test. txt file \n"); exit(1); } fwrite( s1 ,7,1 ,fp); /* 把从地址s1开始到7个字符写到fp所指文件中*/ fseek(fp,OL,SEEK_SET); /*文件位置指针移到文件开头*/ fwrite (s2,5,1,fp); felose (fp);}
A.Basiean
B.BasieFortran
C.Basic
D.FortranBasie
相关考题:
以下程序用来判断指定文件是否能正常打开,请填空#include stdio.hmain( ){FILE *fp;if (((fp=fopen(“test.txt”,”r”))==【13】))printf(“未能打开文件!\n”);elseprintf(“文件打开成功!\n”);
执行以下程序后,test.txt文件的内容是(若文件能正常打开)( )。includemain(){FILE*fp;c 执行以下程序后,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.BasicanB.BasicFortranC.BasicD.FortranBasic
下面的程序执行后,文件test.txt中的内容是() include void fun(char* 下面的程序执行后,文件test.txt中的内容是 ( ) # include<stdio.h> void fun(char*<fname,char * st) { FILE*myf;int i; myf=fopen(fname,"w"); for(i=0;i<strlen(st);i+ +) fputc(st[i],myf); fclose (myf); } main( ) { fun("test","new word"); fun("test","hello"); }A.helloB.new worldhello,C.new worldD.hello,rld
下面的程序执行后,文件test.txt中的内容是______。 include void fun(char *fname,char 下面的程序执行后,文件test.txt中的内容是______。 #include<stdio.h> void fun(char *fname,char *st) { FILE*myf;int i; myf=fopen("test.txt","w"); for(i=0;i<strlen(st);i++) fputc(st[i],myf); fclose(myf); } main() { fun("test","new one"); fun("test","hello,"); }A.hello,B.new onehello,C.new oneD.hello,ne
以下程序用来判断指定文件是否能正常打开,请填空。 include main() {FILE*fp;if(((fp=fo 以下程序用来判断指定文件是否能正常打开,请填空。include<stdio.h>main(){FILE*fp;if(((fp=fopen("test.txt","r"))=【 】))printf("未能打开文件!\n");elseprintf("文件打开成功!\n");}
以下程序的执行结果是_______。 include include include void 以下程序的执行结果是_______。include<iostream.h>include<fstream.h>include<stdlib.h>void main(){char ch:fstream file:file.open("abc.dat",ios::out1ios::inlios::binary);if(! file){cout<<“abc.dat文件不能打开”<<endl:abort
执行以下程序后,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所指文件中*/ f seek(fp, 0L,SEEK_SET);/*文件位置指针移到文件开头*/ fwrite(s2,5,1,fp); fclose(fp); }A.BasicanB.BasicFortranC.BasicD.FortranBasic
1、若程序中含有以下移位函数LED_PORT=_crol_(0xfe,1),则编程时必须包含以下哪条头文件()。A.#include <intrins.h>B.#include <stdio.h>C.#include <math.h>D.#include <absacc.h>
若程序中含有以下移位函数LED_PORT=_crol_(0xfe,1),则编程时必须包含以下哪条头文件()。A.#include <absacc.h>B.#include <stdio.h>C.#include <intrins.h>D.#include <math.h>