strcpy(str1,str2)
表达式strcmp(str1,str2)的值大于0
str1=str2
表达式strlen(str1)的值为6
第1题:
( 6 )若有定义语句: int a=3,b=2,c=1;, 则表达式 a<b?a:b 的值是 ___________ 。
第2题:
若有以下定义和语句: ( ) ints[4][5](* ps)[5]; ps=s; 则对s数组元素的正确引用形式是
A.psq+1
B.*(ps+3)
C.ps[0][2]
D.*(ps+1)+3
第3题:
若有定义语句: int a=5; ,则表达式: a++ 的值是 【 6 】 。
第4题:
Aps[0]是字符串”aa”
B*ps[0]是字符串”aa”的首地址
Cps[0]是字符串”aa”的首地址
D*ps[0]是字符串”aa”
正确答案:C
第5题:
若有以下定义,则不能代表字符。的表达式是______。 char s[20]="programming",*ps=s;
A.ps+2
B.s[2]
C.ps[2]
D.ps+=2,*ps
第6题:
若有以下说明,则( )不是对strcpy库函数正确的调用。strcpy库函数用于复制一个字符串:char*strl="abCd",str2[10],*str3="hijklmn",*str4[2],*str5="aaaa";
A.strcpy(str2,strl)
B.strcpy(str3,strl)
C.strcpy(strl,str2)
D.strcpy(str5,strl)
第7题:
运行下面程序,其输出结果(str2的值)为【 】。
Dim str1,str2 As String
Dim i As Integer
strl="abcdef"
For i=1 To Len(str1) Step2
str2=UCase(Mid(str1,i,1))+str2
Next
MsgBox str2
第8题:
( 6 )若有定义语句: int* a, b; ,则变量 b 的数据类型是 【 6 】 。
第9题:
若有以下定义和语句: int s[4][5],( *ps)[5]; ps=s; 则对s数组元数的正确引用形式是
A.ps+1
B.*(ps+3)
C.ps[0][2]
D.*(ps+1)+3
第10题:
语句定义如下: char strl[50],str2[20],ch; 则下列语句正确的是______。
A.str1={"Crazy"}; str2=str1;
B.str1={"Crazy"}; str2={"English"}; strcpy(str1,str2);
C.ch="xy";
D.ch='x';