网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
有以下程序: include include using namespace std; int main () {char ch[]
有以下程序:
include <fstream>
include <string>
using namespace std;
int main ()
{
char ch[] = "The end";
ofstream outstr( "d:\\put.txt", ios_base: :app);
for (int i = 0; i < strlen( ch ); i++ )
outstr.put(ch[i]);
outstr.close();
return 0;
}
程序实现的功能是【 】。
参考答案
更多 “ 有以下程序: include include using namespace std; int main () {char ch[] 有以下程序:include <fstream>include <string>using namespace std;int main (){char ch[] = "The end";ofstream outstr( "d:\\put.txt", ios_base: :app);for (int i = 0; i < strlen( ch ); i++ )outstr.put(ch[i]);outstr.close();return 0;}程序实现的功能是【 】。 ” 相关考题
考题
以下程序的输出结果是【 】。includeincludechar*fun(char*0{ char *p--t;retur
以下程序的输出结果是【 】。include <stdio.h>include <string.h>char *fun(char *0{ char *p--t;return (p+strlen(t)/2);}main(){ char *str="abcdefgh";str=ftm(str);puts(str);}
考题
有以下程序includemain(){char *p=“abcde、Ofghjik\0”;printf(“%d\n”,strlen(p));} 程
有以下程序 #include<string.h> main() { char *p=“abcde、Ofghjik\0”; printf(“%d\n”,strlen(p)); } 程序运行后的输出结果A.12B.15C.6D.5
考题
有以下程序:includemain(){char *p="abcde\Ofghjik\0";printf("%d\n",strlen(p));}程
有以下程序: #include <string.h> main() {char *p="abcde\Ofghjik\0"; printf("%d\n",strlen(p)); } 程序运行后的输出结果是( )。A.12B.15C.6D.5
考题
有以下程序:include include using namespace std;int main ( ){ ofstream
有以下程序: #include <iostream> #include <fstream> using namespace std; int main ( ) { ofstream ofile; char ch; ofile.open ("abc.txt"); cin>>ch; while (ch!='#' ) { cin>>ch; ofile.put(ch);A.程序编译时出错B.abc#C.abcD.#
考题
有以下程序include.main(){char*p="abcde\ofghjik\0";printf("%d\n",strlen(p));} 程
有以下程序 #include.<string.h> main() { char *p="abcde\ofghjik\0"; printf("%d\n",strlen(p)); } 程序运行后的输出结果是A.12B.15C.6D.5
考题
有以下程序:include include main(){char *p[10]={"abc","aabdfg","dcdbe"
有以下程序: #include <stdio.h> #include <string.h> main() { char *p[10]={"abc","aabdfg","dcdbe","abbd","cd"}; printf("%d\n",strlen(p[4])); } 执行后的输出结果是( )。A.2B.3C.4D.5
考题
以下程序的输出结果是【 】。includeincludechar*fun(char*t){ char *p=t;retur
以下程序的输出结果是【 】。include <stdio.h>include <string.h>char *fun(char *t){ char *p=t;return (p+strlen(t)/2);}main(){ char *str="abcdefgh";str=ftm(str);puts(str);}
考题
以下程序运行后的输出结果是() 。 #include <stdio.h> #include <stdlib.h> #include <string.h> main() { char *p; int i; p=(char *)malloc(sizeof(char)*20); strcpy(p,"welcome"); for(i=6;i>=0;i--) putchar(*(p+i)); printf("n"); free(p); }
考题
21、以下程序执行后的结果为 。 #include "stdio.h" #include <string.h> void fun(char *s) { char a[10]; strcpy(a,"string"); s=a; } main() { char *p="gao"; fun(p); printf("%s\n",p); }A.gaoB.结果不确定C.strD.string
热门标签
最新试卷