以下程序: #include<stdio.h> #include<string.h> main() {char str[]="abcd\n\123\xab"; printf("%d",(str)); } 运行后的输出结果是( )。
A.10
B.9
C.7
D.14
第1题:
将输入的字符串按逆序输出,例如输入abcd,则按dcba顺序输出出来,请完善程序。 #include <stdio.h> #include <string.h> int main() { char *str, s[20]; int n; str=s; scanf("%s",str); n=strlen(str); while(--n>=0) { str=&s[____]; printf("%c",*str); } return 0; }
第2题:
将输入的字符串按逆序输出,例如输入abcd,则按dcba顺序输出出来,请完善程序。 #include <stdio.h> #include <string.h> int main() { char *str, s[20]; int n; str=s; scanf("%s",str); n=strlen(str); while(--n>=0) { str=&s[ ________ ]; printf("%c",*str); } return 0; }
第3题:
以下程序的输出结果是【 】。
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);
}
第4题:
以下程序 #include<stdio.h> #include<string.h> main() { char*p1="abc",*p2="ABC",str[50]="xyz"; strcpy(ar+2,strcat(p1,p2)); printf("%s\n",str); } 的输出是______。
A.xyzabcABC
B.zabeABC
C.yzabcABC
D.xyabcABC
第5题:
以下程序 #include<stdio.h> #include<string.h> main() { char*pl="abc",*p2="ABC",str[50]="xyz"; strcpy(str+2,strcat(p1,p2)); printf("%s\n",str); } 的输出是________。
A.xyzabcABC
B.zabcABC
C.yzabcABC
D.xyabcABC
第6题:
以下程序 #include<stdio.h> #include<string.h> main() { char*p1="abc",*p2="ABC",str[50]="xyz"; strcpy(str+2,strcat(p1,p2)); printf("%ss\n",str); } 的输出是______。
A.xyzabcABC
B.zabcABC
C.yzbcABC
D.xyabcABC
第7题:
以下程序#include<stdio.h>#include<string.h>main(){ char*p1="abc",*p2=-"ABC", str, [50]="xyz"; strcpy(str+2,strcat(p1,p2)); printf("%s\n", str);}
A.xyzabcABC
B.zabcABC
C.yzabcABC
D.xyabcABC
第8题:
以下程序 #include<stdio.h> #include<string.h> main() { char*pl="abc",*p2="ABC",str[50]="xyz"; strcpy(str+2.strcat(p1,p2)); printf("%s\n,str); } 的输出是______。
A.xyzabcABC
B.zabcABC
C.yzabcABC
D.xyabcABC
第9题:
以下程序 #include<stdio.h> #include<string.h> main() { char*p1="abc",*p2="ABC",str[50]="xyz", strcpy(str+2,strcat(p1,p2)); printf("%s\n",str); } 的输出是______。
A.xyzabcABC
B.zabcABC
C.yzabcABC
D.xyabcABC