以下程序的输出结果是 #include <stdio.h> #include <string,h> main() { char b1[8]="abcdefg",b2[8],*pb=b1+3; while (--pb>=b1) strcpy(b2,pB) ; printf("%d\n",strlen(b2)); }
A.8
B.3
C.1
D.7
第1题:
有以下程序: #include <iostream> #include <string> using namespace std; int main ( ) { char b1[8] = "abcdefg"; char b2[8],*pb=b1+3; while (--pb>=b1) strcpy (b2, Pb) ; cout<<strlen (b2) <<end1; return 0; } 程序运行后的输出结果是( )。
A.8
B.3
C.1
D.7
第2题:
以下程序的输出结果是 #include<stdio.h> #include<string.h> main() { char b1[8]=“abcdefg”,b2[8],*pb=b1+3; while(--pb>=b1)strcpy(b2,pb) ; printf(“%d\n”,strlen(b2)); }
A.8
B.3
C.1
D.7
第3题:
23、下面程序执行后的输出结果是()。 #include <stdio.h> #include <string.h> int main() { char b1[8]="abcdefg",b2[8],*pb=b1+3; while (--pb>=b1) strcpy(b2,pb); printf("%d",strlen(b2)); return 0; }
A.7
B.8
C.3
D.1
第4题:
有以下程序 #includ2<stdio.h> #include<string.h> main() { char b1[8]="abcdefg",b2[8],*pb=b1+3, while(--pb>b1)strcpy(b2,pB) ; printf("%d\n",strlen(b2)); } 程序运行后的输出结果是( )
A.8
B.3
C.1
D.6
第5题:
以下程序的输出结果是【 】。
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);
}