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

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

若有以下语句,则正确的描述是 。 static char x[ ]=”12345” ; static char y[ ]={‘1’,‘2’,‘3’,‘4’, 5’,’0’} ;

A.x数组长度大于y数组长度

B.x数组和y数组不相同

C.x数组长度小于y数组长度

D.x数组等价于y数组


参考答案和解析
B
更多 “若有以下语句,则正确的描述是 。 static char x[ ]=”12345” ; static char y[ ]={‘1’,‘2’,‘3’,‘4’, 5’,’0’} ;A.x数组长度大于y数组长度B.x数组和y数组不相同C.x数组长度小于y数组长度D.x数组等价于y数组” 相关考题
考题 若有定义 :char *x="abcdefghi"; ,以下选项中正确运用了 strcpy 函数的是A)char y[10]; strcpy(y,x[4]);B)char y[10]; strcpy(++y,x[1]);C)char y[10],*s; strcpy(s=y+5,x);D)char y[10],*s; strcpy(s=y+1,x+1);

考题 若有以下定义和语句union data{ int i; char c; float f; } x;int y;则以下语句正确的是A)x=10.5;B)x.c=101;C)y=x;D)printf("%d\n",x);

考题 若有语句:taticcharx[]=”12345″;staticchary[]={‘1′,’2′,’3′,’4′,’5’};则下面那一个是正确的描述。() A.x数组和y数组的长度相同B.x数组长度大于y数组长度C.x数组长度小于y数组长度D.x数组等价于y数组

考题 以下不正确的定义语句是A.double x[5]={2.0,4.0,6.0,8.0,10.0};B.int y[5.3]={0,1,3,5,7,9};C.char c1[]={′1′, ′2′, ′3′, ′4′, ′5′};D.char c2[]={′\x10′, ′\xa′, ′\x8′};

考题 以下不正确的定义语句是A.double x[5]={2.0,4.0,6.0,8.0,10.0};B.int y[5]={0,1,3,5,7,9};C.char c1[]={'1','2','3','4','5'};D.char c2[]={'\x10','\xa','\x8'};

考题 若有定义:char *x="abcdefghi";,以下选项中正确运用了strcpy函数的是______。A.char y[10]; strcpy(y,x[4]);B.char y[10]; strcpy(++y,x[1]);C.char y[10],*s; strcpy(s=y+5,x);D.char y[10],*s; strcpy(s=y+1,x+1);

考题 若有以下类型说明语句: char w;int x;float y, z; 则表达式w*x+z-y的结果为______类型。A.floatB.charC.intD.double

考题 若有以下的说明,对初值中整数2的正确引用方式是 static struct {char ch; int i; double x; } a[2][3]={{{'a',1,3,45},{'b',2,7,98},{'c',31,93}}};A.a[0][1].chB.a[0][1].iC.a[0][0].iD.a[0][2].i

考题 下列程序段的输出结果为()。includemain(){static char a[]="language";char*p;p=a;for 下列程序段的输出结果为( )。 #include<stdio.h> main() { static char a[]="language"; char*p; p=a; for(p=a;p<a+8;p+=2) putchar(*p); }A.1B.4C.9D.0

考题 若有定义和语句: char*sl="12345",* s2="1234"; printf("%d\n",strlen(stren(sl,s2))); 则输出结果 ( )A.4B.5C.9D.10

考题 下列语句中,不正确的是______。A.static int a[2][3]={1,2,3,4,5,6};B.static int a[2][3]={{1},{4,5}};C.static int a [][3]={{1},{4}};D.static int a [][]={{1,2,3},{4,5,6}};

考题 下列语句中,不正确的是______。A.static char a[]={"China"};B.static char a[]="China";C.printf("%s",a[0]);D.scanf("%s",a);

考题 若有以下定义和语句: char*s1="12345",*s2="1234"; printf("%d\n",strlen(strcpy(s1,s2)));则输出结果是______。A.4B.5C.9D.10

考题 以下不正确的定义语句是( )。A.double x[5]={2.0,4.0,6.0,8.0,10.0};B.int y[5.3]={0,1,3,5,7,9};C.charc\[]={'1','2','3','4','5'};D.char c2[]={'\x10','\xa','\x8'};

考题 以下不正确的定义语句是A.double x[5]={2.0,4.0,6.0,8.0,10.0};B.int y[5]={0,1,3,5,7,9};C.char cl[]={'1','2','3','4','5'};D.char c2[]={'\x10','\xa','\x8'};

考题 若有以下变量和函数说明:includecharCh='*';void sub(int x,int y,char ch,double* 若有以下变量和函数说明: #include<iostream.h> charCh='*'; void sub(int x,int y,char ch,double*Z) { switch(ch) { case'+':*Z=x+y;break; case'-':*Z=x-y;break: case'*':*Z=x*y;break; case'/':*z=x/y;break: } } 以下合法的函数调用语句是( )。A.sub(10,20,Ch,y);B.sub(1.2+3,2*2,'+',Z);C.sub(sub(1,2,'+',y),sub(3,4'+',x),'-',y);D.sub(a,b,x,ch);

考题 以下不正确的定义语句是( )。A.double x[5]={2.0,4.0,6.0,8.0,10.0};B.int y[5]={O,1,3,5,7,9};C.char c1[]={'1','2','3','4','5'};D.char c2[]={'\x10','\xa','\x8'};

考题 若有以下定义语句: char * sl="12345", * s2="1234"; printf("%d"n",strlen(strcpy(s1,s2))); 则输出结果是 ( )A.4B.5C.9D.10

考题 下列语句中,正确的是______。A.static char str[]="China";B.static char str[];str="China";C.static char str1[5],str2[]={"China"};strl=str2;D.static char str1[],str2[];str2={"China"};strcpy(str1,str2);

考题 若有以下的说明语句,则与它等价的说明是char s[3][5]={"aaaa","bbbb","cccc"};A.char**s1={"aaaa","bbbb","cccc"};B.char*s2[3]={"aaaa","bbbb","cccc"};C.char s3[][5]={"aaaa","bbbb","cccc"};D.char s4[][4]={"aaaa","bbbb","cccc"};

考题 以下不正确的定义浯句是A.double x[5]={2.0,4.0,6.0,8.0,10.0};B.int y[5]={0,1,3,5,7,9};C.char c1[]={‘1’,’2’,’3’,’4’,’5’};D.char c2[]={‘\x10’,’\xa’,’\x8’};

考题 若有以下说明,则对初值中字符a的引用方式为( )。 static struct { char ch; double x; char a(); }c[2] [3]={ { {'a',3.5,"bc"}, {'c',4.5,"de"}, {'m',8.6,"abc"} }, { {'d',8.5,"ic"}, {'b',5.5,"dc"}, {'n',8.6,"anc'} }};A.c.chB.c[0][0].chC.c[1][1].chD.a[0]

考题 若有以下语句,且0≤K6,则(36)是对数组元素地址的正确表示。 static int x[]={1,3,5,7,9,11},*ptr,k; ptr=x;A.x++;B.ptrC.(x+1)D.ptr[k]

考题 在下列语句中,正确的是( )A.static char str[]="China";B.static char str[];str="China";C.static char str1[5],str2[]={"China"};str1=str2;D.static char str1[],str2[];str2={"China"};strcpy(str1,str2);

考题 下列定义数组的语句中不正确的是().A、static int a[2][3]={1,2,3,4,5,6};B、static int a[2][3]={{1},{4,5}};C、static int a[][3]={{1},{4}};D、static int a[][]={{1,2,3},{4,5,6}};

考题 数组char x[]="12345";和char y[]={’1’,’2’,’3’,’4’,’5’};长度相同。

考题 以下能正确定义一维数组的是()A、int a〔5〕={0,1,2,3,4,5};B、int a〔5〕=”012345”;C、char.〔 〕=”012345”;D、char a〔5〕={0,1,2,3,4,5};

考题 以下不正确的定义语句是()。A、double x[5]={2.0,4.0,6.0,8.0,10.0};B、int y[5]={0,1,3,5,7,9};C、char c1[]={‘1’,’2’,’3’,’4’,’5’};D、char c2[]={‘x10’,’xa’,’x8’};