以下程序运行后输出的结果是 ______。 a = 3 b=-123 m=Len(Str$(A)+Str$(B)) Print m End
A.9
B.5
C.7
D.8
第1题:
有以下程序: # include<string.h> main() { char str[][20]={"Hello","Beijing"},*p=str; printf("%d\n",strlen(p+20)); } 程序运行后的输出结果是 ______。
A.0
B.5
C.7
D.20
第2题:
运行下面程序,其输出结果(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
第3题:
有以下程序: #include<string.h> main() { char str[][20]={"Hello","Beijing"),*p=str[0]; printf("%d\n",strlen(p+20)); } 程序运行后的输出结果是( )。
A.0
B.5
C.7
D.20
第4题:
以下程序段运行后消息框的输出结果为______。
s="Access"
Dim str As String
For i=1 To Len(s)
str=UCase(Mid(S,I,I))+str
Next i
MsgBox str
第5题:
若有以下程序:
include <iostream>
using namespace std;
int main()
{
char str[10];
cin>>str;
cout<< str<<end1;
return 0;
}
当输入为:
This is a program!
那么执行程序后的输出结果是【 】。
第6题:
以下程序运行后的输出结果是______。
include <iostream>
include <string>
using namespace std;
class Y;
class X
{
int x;
char *strx;
public:
X(int a, char *str)
{
x=a;
strx=new char[strlen(str)+1]
strcpy (strx,str);
}
void show(Y &ob);
};
class Y
{
prlvate:
int y;
char *stry;
public:
Y(int b,char *str)
{
y=b;
stry=new char[strlen(str)+1];
strcpy(stry,str);
}
friend void X::show(Y &ob);
};
void X::show{Y &ob)
{
cout<<strx<<",",
cout<<ob.stry<<endl;
}
int main{
{
X a (10, "stringX");
Y b (20, "stringY");
a. show (b);
renurn 0;
}
第7题:
以下程序: #include<stdio.h> #include<string.h> main() {char str[]="abcd\n\123\xab"; printf("%d",(str)); } 运行后的输出结果是( )。
A.10
B.9
C.7
D.14
第8题:
以下程序的输出结果是( )。 char str[15]=”hello!”; printf(“%d\n”,strlen(str));
A.15
B.14
C.7
D.6
第9题:
有以下程序: #include < stdio. h > main( ) { ehar str[ ] [10] = { "China" ," Beijing" } , * p = str[o]; printf( "% s \n", p + 10); }程序运行后的输出结果是( )。
A.China
B.Beijing
C.ng
D.ing
第10题:
当运行以下程序时,输入abcd,程序的输出结果是:( )。
insert(char str[])
{int i;
i=strlen(str);
while(i>0)
{str[2*i]=str[i];str[2*i-1]='*';i--;}
printf("%s\n",str);
}
main()
{char str[40];
scanf("%s",str);insert(str);
}
第11题:
6
7
11
12
第12题:
C##123#0
C##1230
C##0
C##123#\0
第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
main()
{ char str[][20]={"Hello","Beijing"},*p=str;
printf("%d\n",strlen(p+20));
}
程序运行后的输出结果是
A.0
B.5
C.7
D.20
第15题:
有以下程序: #include <string.h> main() { char str[][20]={"Hello","Beijing"}*p=str; printf("%\n",strlen(p+20)); } 程序运行后的输出结果是
A.0
B.5
C.7
D.20
第16题:
以下程序运行后输入:3,abcde<回车>,则输出结果是【 】
include <string.h>
move(char *str, int n)
{ char temp; int i;
temp=str[n-1];
for(i=n-1;i>0;i--) str[i]=str[i-1];
str[0]=temp;
}
main( )
{ char s[50]; int n, i, z;
scanf("%d,%s",&n,s);
z=strlen(s);
for(i=1; i<=n; i++) move(s, z);
printf("%s\n",s);
}
第17题:
下面程序的输出结果为______。
a=4.5
b=-123
c=Len(Str(B) +Str(A))
Msg Box c
第18题:
请读程序段: char str[]="ABCD",*p=str print("%d\n",*(p+4)); 程序段的输出结果是______。
A.68
B.O
C.字符'D'的地址
D.不确定的值
第19题:
运行下面程序,其输出结果(str2的值)为【 】。
Dim str l,str2 As String
Dim I As Integer
str l= “abcdef”
For l To Len (strl) Step2
str2=UCase (Mid (strl,I ,1))十str2
Next
MsgBoxstr2
第20题:
下列程序段运行后消息框的输出结果为______。
s="Access"
Dim Str As String
For i=1 To Len(s)
str=UCase(Mid(S,i,1) ) +str
Next I
MsgBox str
第21题:
有以下程序: #include <stdio.h> #include <string.h> main() { char str[][20]={"Hello","Beijing"},*P=str[0]; printf("%d\n",strlen(p+20)); } 程序运行后的输出结果是( )。
A.0
B.5
C.7
D.20
第22题:
以下程序的输出结果是【 】。
include <stdio.h>
include <string.h>
char *fun(char *t)
{ char *p=t;
return (p+strlen(t)/2);
}
main()
{ char *str="abcdefgh";
str=ftm(str);
puts(str);
}
第23题:
NAME0
NAMEE
NAME
NAME\0