更多"有以下程序: main( ) char s[]='abcde'; "的相关试题:
[单项选择]有下列程序:
main( )
char s[]="abcde";
S+=2;
printf("%d/n",s[0]);
执行后的结果是( )。
A. 输出字符a的ASCII码
B. 输出字符c的ASCII码
C. 输出字符c
D. 程序出错
[单项选择]有以下程序
point(char *p) p+=3;
main( )
char b[4]='a'.'b','c','d', *p=b;
point(p);
printf("%c/n",*p);
程序运行后的输出结果是
A. a
B. b
C. c
D. d
[单项选择]下面程序段的运行结果是
char *S="abcde";
s+=2;printf("%d",s);
[单项选择]下面程序段的输出结果是______。
char *s="abcde";
s+=2;printf("%d",s);
[单项选择]下面程序段的运行结果是
char*s="abcde";
s+=2;printf("%d",s);
[单项选择]有以下程序
point(char *p) p+=3;
main( )
char b[4]='a','b','c','d',*p=b;
point(p); printf("%c/n",*p);
程序运行后的输出结果是______。
A. a
B. b
C. c
D. d
[单项选择]阅读以下程序
#includc<iostream.h>
vold main( )
Char line[10];
cin>>line;
cout<<line<<endl;
如运行时输入This is example.<CR>,则程序的输出结果是
A. This
B. This is
C. This is a
D. This is an example.
[单项选择]阅读以下程序
#include<iostream.h>
void main( )
char line[10];
cin>>line;
cout<<line<<endl;
如运行时输入This is example.<CR>,则程序的输出结果是
A. This
B. This is
C. This is a
D. This is an example.
[单项选择]有以下程序:
#include <string.h>
main( )
char str[][20]="Hello","beijing",*p=str;
ptintf("%/n",strlen(p+20));
程序运行后的输出结果是( )。
A. 0
B. 5
C. 7
D. 20
[单项选择]有以下程序:
# 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
[单项选择]有以下程序
#include 〈string.h〉
main ( )
char p[]='a','b ,'c', q[10]='a','b','c';
printf("%d %d/n",strlen(p),strlen(q));
以下叙述中正确的是
A. 在给p和q数组置初值时,系统会自动添加字符串结束符,故输出的长度都为3
B. 由于p数组中没有字符申结束符,长度不能确定;但q数组中字符串长度为3
C. 由于q数组中没有字符串结束符,长度不能确定:但p数组中字符串长度为3
D. 由于p和q数组中都没有字符串结束符,故长度都不能确定