题目内容

以下程序的运行结果是______ #include using namespace std;int main(){ int x=0,y=5,z=3; while (z-->0&&++x<5) y=y-1; cout<

查看答案
更多问题

有以下程序段 char st[20]="hello\0\t\\";printf("%d%d\n",strlen(st),sizeof(st)); 输出结果是( )。

A. 9 9
B. 5 20
C. 13 20
D. 20 20

程序段 char s[ ]=”\tstring\n”; printf(“%d”,strlen(s));的运行结果是( )。

A. 8
B. 9
C. 10
D. 11

以下程序的运行结果是______ #include #include using namespace std;int main(){ char *p1, *p2, str[50]="ABCDEFG"; p1="abcd"; p2="efgh"; strcpy(str+2, p1+1); strcpy(str+3, p2+2); cout << str+1; return 0;}

以下程序的运行结果是______ #include using namespace std;int main(){ char c[ ]="the teacher"; int n=0; while(c[++n]!='\0') if (c[n-1]=='h') cout<

答案查题题库