有如下定义:charstr[3][2]={’a’,’b’,’c’,’/0’,’e’,’f’};则语句:printf("%s",str[0]);的输出结果是()
第1题:
下列程序的输出结果是( )。 #include <stdio.h> struct abc { int a, b, c, s;}; main() { struct abc s[2]={{1,2,3},{4,5,6}}; int t; t=s[0].a+s[1].b; printf("%d\n",t); }
A.5
B.6
C.7
D.8
第2题:
设有如下定义 int x=10,y=3,z; 则语句 printf("%d\n",z=(x%y,x/y)); 的输出结果是( )
A.3
B.0
C.4
D.1
第3题:
下列程序段的运行结果是( )。
#include<stdio.h>
void main()
{ char str[]="ABC",*p=str;
printf("%d\n",*(p+3) );
}
A.67
B.0
C.字符'C'的地址
D.字符'C'
第4题:
设有如下定义: int x=10,y=3,z; 则语句printf("%d\n",z=(x%y,x/y)); 的输出结果是( )。
A.1
B.0
C.4
D.3
第5题:
下面程序的输出结果是 ( ) # include<stdio.h> # include<string.h> { char * p1="abc" , * p2=" ABC ",str[50]="xyz"; strcpy(str+2.strcat (pi,p2)); printf("%s\n",str);}
A.xyzabcAB
B.zabcABC
C.yzabcABC
D.xycbcABC
第6题:
下面程序段的输出结果是( )。 char str[]="ABC",*p=str; Printf("%d\n",*(p+3));
A.67
B.0
C.字符'C'的地址
D.字符'C'
第7题:
下列程序段的输出结果是()。 char str[ ]= “abc/0def/0ghi”, *q=str; printf(“%s”,q+5);
第8题:
已知charstr[]="afternoon”;则若要输出数组中f字符,则下列引用正确的是()
第9题:
设有定义语句:charstr[][20]={"Hello","Beijing"},*p=str;()则printf("%d/n",strlen(p+20));输出结果是
第10题:
若定义了charch[]={″abc/0def″},*p=ch;则执行printf(″%c″,*p+4);语句的输出结果是()
第11题:
ab
abcef
abc/0
abc
第12题:
1
0
4
3
第13题:
以下C程序段的输出结果是(30)。 #include <stdio. h> void abc(char *str){ int a, b; for(a=b=0;str[a]!='\O';a++)if(str[a]!='c') str[b++]=str[a]; str[b]='\O'; } void main(){ char str[]="abcdef"; abc(str); printf("str[]=%s",str); }
A.str[]=a
B.str[]=ab
C.str[]=abdef
D.str[]=abcdef
第14题:
下列程序段的运行结果是( )。 #include<stdio.h> void main() { char str[]="ABC",*p=str; printf("%d\n",*(p+3)); }
A.67
B.0
C.字符'C'的地址
D.字符'C'
第15题:
有如下程序段struct abc{ int a, b, c, s;};main(){ struct abc s[2]={{1,2,3},{4,5,6}}; int t; t=s[0].a+s[1].b; printf("%d\n",t);}程序运行后输出的结果是A.5 B.6 C.7 D.8
第16题:
A.ab
B.abcef
C.abc\0
D.abc
第17题:
下面程序的输出结果是 #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
第18题:
A.def
B.d
C.e
D.0
第19题:
设有如下定义:intx=10,y=3,z;则语句 printf("%d/n",z=(x%y,x/y));的输出结果是()
第20题:
设有如下定义:int x=l,y=-1;,则语句:printf("%d/n",(x--&++y));的输出结果是()
第21题:
设有如下定义:intx=l,y=-1;,则语句:printf(""%d/n"",(x--&++y));的输出结果是()
第22题:
def
d
e
0
第23题: