以下程序段运行后的输出结果是()。char*p="abcdefghjik";printf("%d",strlen(p));
A: 12
B: 15
C: 5
D: 6
A: 12
B: 15
C: 5
D: 6
举一反三
- 有以下程序 #include<string.h> #include<iostream.h> void main( ) { char*p="abcde\0fghjik\0"; cout<<strlen(p);} 程序运行后的输出结果是 A: 12 B: 15 C: 6 D: 5
- 下面程序段的运行结果是()。 char *p= "abcdefgh"; p+=2; printf("%d\n", strlen(strcpy(p, "ABCD"))); A: 6 B: 12 C: 4 D: 7
- #include #include main() {char str[][20]={"One*World","One*Dream!"}; char *p=str[1]; printf(“%d,”,strlen(p)); printf("%s ",p); } 程序运行后的输出结果是
- 下面程序段的运行结果是().char*p="abcdefgh";p+=3;printf("%d\n",strlen(strcpy(p,"ABCD")));
- 下面程序段的运行结果是( )。 char a[]="abcdefgh"; char *p=a; p+=3; printf("%d\n",strlen(strcpy(p,"ABCD"))); A: 8 B: 12 C: 4 D: 7