网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
执行char a[10]={"abcd"},*p=a;后,*(p+4)的值是()
A."abcd"
B.'d'
C.'0'
D.不能确定
参考答案和解析
D
更多 “执行char a[10]={"abcd"},*p=a;后,*(p+4)的值是()A."abcd"B.'d'C.'0'D.不能确定” 相关考题
考题
有以下程序 main() { char s[]="ABCD",*p; for(p=s+1;p<s+4;p++)printf("%s\n",p); } 程序运行后的输出结果是A.ABCD BCD CD DB.A B C DC.B C DD.BCD CD D
考题
下列判断正确的是( )。A.char a="ABCD";等价于char*a:*a="ABCD";B.char str[10]={"ABCD"};等价于char str[10];str[]={"ABCD"};C.char*s="ABCD";等价于char s;*s="ABCD";D.char c[5]="ABCD",d[5]="ABCD";等价于char c[5]=d[5]="ABCD";
考题
执行语句序列char str1[10]="ABCD",str2[10]="XYZxyz";for(int i=0;strl[i]=str2[i];i++);后,数组strl中的字符串是______。
考题
要禁止修改指针p本身,又要禁止修改p所指向的数据,这样的指针应定义为( )。
A.const char *p=”ABCD”;B.char const *p=”ABCD”;C.char *const p=”ABCD”;D.const char *const p=”ABCD”;
考题
下面程序的输出是______。 char s[]="ABCD"; main() { char *p; for(p=s;p<s+4;p++) printf("%s\n",p); }A.ABCD BCD CD DB.A B C DC.D C B AD.ABCD ABC AB A
考题
下面程序段的运行结果是( )。 char a[]="abcdefgh"; char *p=a; p+=3; printf("%d\n",strlen(strcpy(p,"ABCD")));A.8B.12C.4D.7
考题
有以下程序: include main ( ){char s[] = "ABCD", * p;for(p=s+1;p
有以下程序: #include < stdio. h > main ( ) { char s[] = "ABCD", * p; for(p=s+1;p<s+4;p++) pfintf(" % s \n" ,p); }A.ABCD BCD CD DB.A B CC.B C DD.BCD CD D
考题
下列程序的输出结果是______。includemain(){char*p1,*p2,str[50]="xyz"; p1="abcd"; p
下列程序的输出结果是______。 #include<stdio.h> main() { char *p1,*p2,str[50]="xyz"; p1="abcd"; p2="ABCD"; strcpy(str+2,strcat(p1+2,p2+1)); ptintf("%s",str); }A.xyabcABB.abcABzC.ABabczD.xycdBCD
考题
请读程序段: char str[]="ABCD",*p=str; printf("%d\n",*(p+4)); 程序段的输出结果,是_______。A.68B.0C.字符'D'的地址D.不确定的值
考题
执行以下程序段后,m的值为______。 int a[2][3]={ {1,2,3},{4,5,6} }; int m,*p; p=a[0][0]; m=(*p)*(*(p+2))*(*(p+4));A.15B.14C.13D.12
考题
以下程序段的输出结果是 ______。includevoid main(){ char*p[5]={"ABCD","EF","GHI
以下程序段的输出结果是 ______。 #include<iostream.h> void main(){ char*p[5]={"ABCD","EF","GHI","JKL","MNOP"}; char **q=p; int i; for(i=0;i<=4;i++) cout<<q[i]; }A.ABCDEFGHIJKLB.ABCDC.ABCDEFGHIJKMNOPD.AEGJM
考题
下面程序的输出结果是()。includemain(){char a[]={'a','b','c','d','f','g'},*p;p=a;p
下面程序的输出结果是( )。 #include<stdio.h> main() {char a[]={'a','b','c','d','f','g'},*p; p=a; printf("%c\n",*p+4); }A.aB.bC.eD.f
考题
请读程序段:char str[]="ABCD",*p=str;printf("%d\n",*(p+4));程序段的输出结果是 ______。A.68B.0C.字符D的地址D.不确定的值
考题
下列判断正确的是( )。A.chara="ABCD";等价于char*a;*a="ABCD";B.char str[10]={"ABCD"};等价于char str[10];str[]={"ABCD"};C.char*s="ABCD";等价于char s;*s="ABCD";D.charc[5]="ABCD",d[5]="ABCD";等价于char c[5]=d[5]="ABCD";
考题
下面程序的输出结果是( )。 char s()="ABCD",*p; main() { for(p=s;p<s+4;p++)printf("%s\n",p); )A.ABCD BCD CD DB.A B C DC.D C B AD.ABCD ABC AB A
考题
有以下程序:include using namespace std;int main ( ){ char s1[10],s2[10]; char*p
有以下程序: #include <iostream> using namespace std; int main ( ) { char s1[10],s2[10]; char *p=s1,*q=s2; cin>>s1>>s2; while (*p ! =' \0 ' ) p++; while (*q!='\0') *p++=*q++; *p='\0'; cout<<s1<<end1; return 0; }A.abcd0ghijB.abcd0ghij0C.abcdD.abcdghij
考题
有定义语句inta[10],*p=a;以下和此功能相同的是()A、inta[10];intp;p=a;B、inta[10],*p;p=a;C、int*p,a[10];p=a;D、char*a[10]=”abcd”;printf(“%s”,a);
考题
已知p=5,i=2;则p=pi语句执行中关于p的值说明正确的是()。A、执行后等号左边的p是10B、执行中等号右边的p的值是5C、执行后等号左边的p是5D、执行中等号右边的p的值是10
考题
填空题执行char*p=new char(’a’)操作后,p所指向的数据对象的值为()。
热门标签
最新试卷