下面程序运行后的输出结果是______。 struct abc { int a,b,c; } main() { struct abc s [2]={{1,2,3},{4,5,6}}; int t=-s[0].a+s[1].b; printf("%d\n",t); }
A.5
B.6
C.7
D.8
第1题:
以下程序的输出结果是 ( ) #include<string.h> main() {char s1[]="123",s2[]="abc",ss[20]="010"; strcat(ss+1,strcpy(s2,s1)); printf("%s\n",ss); }
A.10123
B.0abc
C.1123
D.01abc
第2题:
下面程序的输出结果为 ______。 #include<string.h> main() { char pl [7]="abc",p[]2="ABC"str[50]="xyz"; strcpy(str,strcat(p1,p2)); printf("%s"str); }
A.xyzabcABC
B.abcABC
C.xyzabc
D.xyzABC
第3题:
下面程序的输出结果是 #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.xyabcABC
D.yzabcABC
第4题:
有以下程序 #inc1ude<stdio.h> main() { char*s={"ABC"}; do { printf("%d",*s%10); s++; } while(*s); } 注意字母A的ASCII码值为65。程序运行后的输出结果是______。
A.5670
B.656667
C.567
D.ABC
第5题:
下面程序的输出结果是______。 #include<string.h> main() { char*p1="abc",*p2="ABC",s[20]="xyz"; strcpy(s+1,p2); strcat(s+2,p1); printf("%s\n",s); }
A.xABCabc
B.zABCabc
C.yzabcABC
D.xyzABCabc
第6题:
下面程序的输出结果是 #include<stdio.h> #include<string.h> main() { char*p1="abc",*p2="ABC",str[50]="xyz"; strcpy(str+2,streat(p1,p2)); printf("%s\n",str);}
A.xyzabcABC
B.zabcABC
C.xyabcABC
D.yzabcABC