网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

设有以下语句: char str[4][12]={"aaa","bbbb","ccccc","dddddd"},*strp[4]; int i; for(i=0;i<4;i++) strp[i]=str[i]; 下列选项不是对字符正确引用的是(其中0≤k<4)( )。

A.strp

B.str[k][k]

C.* strp[k]

D.** strp


参考答案

更多 “ 设有以下语句: char str[4][12]={"aaa","bbbb","ccccc","dddddd"},*strp[4]; int i; for(i=0;i<4;i++) strp[i]=str[i]; 下列选项不是对字符正确引用的是(其中0≤k<4)( )。A.strpB.str[k][k]C.* strp[k]D.** strp ” 相关考题
考题 下列程序的输出结果是()。includevoid main(){char*str=”12123434”;int x1=0,x2=0,x 下列程序的输出结果是( )。 #include<iostream.h> void main() {char*str=”12123434”; int x1=0,x2=0,x3=0,x4=0,i; for(i=0;str[i]!=’\0’;i++) switch(str[i]) {case’1’:x4++; case’2’:x3++; case’3’:x2++; case’4’:xl++; ) cout<<xl<<“,”<<x2<<A.8,6,4,1B.8,6,3,2C.8,8,4,lD.8,6,4,2

考题 下列程序的输出结果是( )。includeiostream.hvoidmain() (char*str=12123434iostream.hvoidmain()(char*str=12123434;intx1=0,x2=0,x3=0,x4=0,i;for(i=0;str[i]!=\0;i++)switch(str[i]){case1:x4++;case2:x3++;case3:x2++;case4:x1++;}coutx1,x2:,x3,x4;}A.8,6,4,1B.8,6,3,2C.8,8,4,1D.8,6.4,2

考题 以下程序的输出结果是______。 fun(int *s,int *p) { static int t=3; *p=s[t]; t--; } main() { int str[]={1,2,3,4},i,m=0; for(i=0;i<4;i++) {fun(str,m); printf("%d",m); } printf("\n"); }A.0B.444412C.1234D.4321

考题 下列程序的输出结果是includevoid main(){char*str="12123434";int x1=0,x2=0,x3=0 下列程序的输出结果是 #include<iostream.h> void main() {char*str="12123434"; int x1=0,x2=0,x3=0,x4=0,i; for(i=0;str[i]!='\0';i++) switch(str[i]) {case'1':x4++; case'2':X3++; case'3':X2++; case'4':X1++; } cout<<X1<<","<A.8,6,4,1B.8,6,3,2C.8,8,4,1D.8,6,4,2

考题 下列程序的输出结果是 #include void main( ) { char * str="12123434"; int x1=0,x2=0,x3=0,x4=0,i; for(i=0;str[i]!='\0';i++) switch(str[i]) { case'1':x4++; case'2':x3++; case'3':x2++; case'4':x1++; } cout < < x1 < < "," < < x2A.8,6,4,1B.8,6,3,2C.8,8,4,1D.8,6,4,2

考题 设有以下语句,若0<k<4,下列选项中不能对数组中字符串的正确引用的是()。 char str[4][12]={"aaa","bbb","ccc","ddd"},*strp[4]; int j; for(j=0;j<4;j++) strp[j]=str[j];A.strpB.*strpC.strp[k]D.str[k]

考题 【单选题】设有以下定义语句,则引用正确(可以得到有效字符或字符串)的是()。 char strp[4][12]={"aaa","bbbb","ccccc","dddddd"};A.strp[0][3]B.strp[2]C.strp[4]D.strp[1][4]

考题 设有以下语句,若0<k<4,下列选项中不能对数组中字符串的正确引用的是()。 char str[4][12]={"aaa","bbb","ccc","ddd"},*strp[4]; int j; for(j=0;j<4;j++) strp[j]=str[j];A.*strpB.strpC.strp[k]D.str[k]

考题 【单选题】设有以下程序段: char str[4][10]={“frist”,”second”,”third”,”forurth”},*strp[4]; int n; for(n=0;n<4;n++) strp[n]=str[n]; 若k为int型变量且0<=k<4,则对字符串的不正确引用是()。A.strpB.str[k]C.strp[k]D.*strp