网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

下面函数的作用是以双倍行距输出文件:

void test(ifstream&outf,ofstream&outC) {

char c;

while(______){

______;

if(c=='\n')outc.put(C) ;

}

}

下划线处缺失的代码是( )。

A.outf.put(C) 与outc.get(C)

B.outf.put(C) 与outc.get(C)

C.outf.get(C) 与outc.put?

D.outf.get(C) 与outc.put?


参考答案

更多 “ 下面函数的作用是以双倍行距输出文件:void test(ifstreamoutf,ofstreamoutC) {char c;while(______){______;if(c=='\n')outc.put(C) ;}}下划线处缺失的代码是( )。A.outf.put(C) 与outc.get(C)B.outf.put(C) 与outc.get(C)C.outf.get(C) 与outc.put?D.outf.get(C) 与outc.put? ” 相关考题
考题 设有以下函数: void fun(int n,char*s){…} 则下面对函数指针的定义和赋值均正确的是( )。A.void(*pf)( );pf=fun;B.void*pf( );pf=funC.void*pf( );*pf=fun;D.void(*pf)(int,char);pf=fun;

考题 void setmemory(char **p, int num){ *p=(char *) malloc(num);}void test(void){ char *str=NULL;getmemory(str,100);strcpy(str,"hello");printf(str);}运行test函数有什么结果?( )

考题 char*getmemory(void){ char p[]=”hello world”;return p;}void test(void){char *str=null;str=Getmemory();printf(str);} 请问运行 Test 函数会有什么样的结果.

考题 void GetMemory(char *p){p = (char *)malloc(100);}void Test(void) {char *str= NULL;GetMemory(str); strcpy(str, "hello world");printf(str);}请问运行 Test 函数会有什么样的结果?

考题 char *GetMemory(void){ char p[] = "hello world";returnp; }void Test(void){char *str = NULL;str = GetMemory(); printf(str);}请问运行 Test 函数会有什么样的结果?

考题 Void GetMemory2(char **p, int num){*p = (char *)malloc(num);}voidTest(void){char *str = NULL;GetMemory(str, 100);strcpy(str, "hello"); printf(str); }请问运行Test 函数会有什么样的结果?

考题 void Test(void){char *str = (char *)malloc(100); strcpy(str, “hello”); free(str); if(str != NULL) { strcpy(str, “world”); printf(str);}}请问运行 Test 函数会有什么样的结果?

考题 设有以下函数:voidfun(intn,char}s){……}则下面对函数指针的定义和赋值均正确的是( )。A.void(*pf)(int,char);pf=fun;B.void+pf( );pf=fun;C.void*pf( );*pf=fun;D.void(*pf)(int,char*);pf=fun;

考题 下面的程序执行后,文件test中的内容是 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); } int main(void){ fun("test", "new world"); fun("test", "hello,"); return 0; }A.new worldhello,B.hello,C.new worldD.hello,rld