下面程序段的运行结果是
char *s="abcde";
s+=2;printf("%d",s);
A.cde
B.字符′c′
C.字符′c′的地址
D.无确定的输出结果
第1题:
下面程序段的运行结果是
char str[]="ABC",*p=str;
printf("%d\n",*(p+3));
A.67
B.0
C.字符′C′的地址
D.字符′C′
第2题:
下面程序段的输出结果是 ______。 char *s="12345"; s+=2; cout<<*s;
A.345
B.字符'3'
C.字符'3'的地址
D.无确定的输出结果
第3题:
A.ced
B.字符'c'
C.字符'c'的地址
D.无确定的输出结果
第4题:
下列程序段的运行结果是( )。 #include<stdio.h> void main() { char str[]="ABC",*p=str; printf("%d\n",*(p+3)); }
A.67
B.0
C.字符'C'的地址
D.字符'C'
第5题:
以下程序运行后;输出结果是______。 main() { char*d[]={"ab","cde"}; printf("%x",d[1]); }
A.cde
B.字符c的ASCII码值
C.字符c的地址
D.出错
第6题:
面下程序段的运行结果是char str[]="ABC",*p=str;printf("%d\n",*(p+3));A.67 B.0 C.字符’C’的地址 D.字符’C’
第7题:
下面程序的运行结果是( )。 #include<stdio.h> #include<string.h> main() {char*s1="abDuj"; char*s2="ABdUG"; int t; t=strcmp(s1,s2); printf("%d",t); }
A.正数
B.负数
C.零
D.不确定的值
第8题:
以下程序: #include<stdio.h> main() {char str[10]; scanf("%s",&str); printf("%s\n",str); } 运行上面的程序,输入字符串how are you,则程序的执行结果是( )。
A.how
B.how are you
C.h
D.howareyou
第9题:
下面程序段的输出结果是______。 char *s="abcde"; s+=2;printf("%d",s);
A.cde
B.字符'c'
C.字符'c'的地址
D.无确定的输出结果
第10题:
有下列程序:
#include<stdi0.h>
voidfun(char*s)
{while(*s)
{if(*s%2==(1)printf("%C",*s);
s+十:
}
}
voidmain( )
{chara[]={"good");
fun(a);printf("n");
}
注意:字母a的ASCIl码值为97,程序运行后的输出结果是( )。
A.d
B.go
C.god
D.good
第11题:
以下程序运行后的输出结果是______。 main() { char*s="abcde";s+=2;printf("%1d\n",s);}
A.cde
B.字符c的ASCII码值
C.字符c的地址
D.出错
第12题:
tuv
字符t的ASCII码值
t
出错
第13题:
下面程序段的运行结果是( )。 #include<stdio.h> void main() {char str[]="ABC",*p=str; pfintf("%d\n",*(p+3)); }
A.67
B.0
C.字符'C'的地址
D.字符'C'
第14题:
有以下程序: #include<stdio.h> main { char s[]="rstuv"; printf("%c\n",*s+2); } 程序运行后的输出结果是( )。
A.tuv
B.字符t的ASCIl码值
C.t
D.出错
第15题:
下面程序段的运行结果是 #include<iostream.h> void main( ) { char*s="abcde"; S+=2; cout<<&s;}
A.cde
B.字符'c'
C.字符'c'的地址
D.无确定的输出结果
第16题:
下列程序段的运行结果是( )。
#include<stdio.h>
void main()
{ char str[]="ABC",*p=str;
printf("%d\n",*(p+3) );
}
A.67
B.0
C.字符'C'的地址
D.字符'C'
第17题:
以下程序运行后,输出结果是______。
main()
{
char*d[]={"ab", "cde"};
printf("%x",d[1]);
}
A.cde
B.字符c的ASCⅡ的值
C.字符c的地址
D.出错
第18题:
运行下面的程序,输入字符串Microsoft Visual Studio,则程序的执行结果是( )。 #include<stdio.h> main() {char Chr[20]; scanf("%s",&Chr); printf("%s\n”,Chr); }
A.Microsoft Visua1 Studio
B.M
C.Microsoft
D.MicrosoflVisualStudio
第19题:
下面程序的运行结果是 #include<stdio.h> #include<string.h> main() { char*s1="AbDeG"; char*s2="AbdEg"; s1+=2;s2+=2; printf("%d\n",strcmp(s1,s2)); }
A.正数
B.负数
C.零
D.不确定的值
第20题:
下面程序段的运行结果是char str[]="ABC",*p=str;printf("%d\n",*(p+3));A.67 B.0 C.字符’C’的地址 D.字符’C’
第21题:
下列程序段的运行结果是( )。#include<stdio.h>void main(){ char str[]="ABC",*p=str; printf("%d\n",*(p+3));}
A.67
B.0
C.字符'C'的地址
D.字符'C'
第22题:
有以下程序(注:字符a的ASCII码值为97)
#include<stdio.h>
main()
{ char*S={"abc"}:
do
{printf("%d",*s%10);++s;}
while(*s);
}
程序运行后的输出结果是
A.abc
B.789
C.7890
D.979899
第23题:
下面程序段的输出结果是( )。 char str[]="ABC",*p=str; Printf("%d\n",*(p+3));
A.67
B.0
C.字符'C'的地址
D.字符'C'
第24题:
输出字符a的ASCII码
输出字符c的ASCII码
输出字符c
程序出错