题目
下面程序段的运行结果是
char str[]="ABC",*p=str;
printf("%d\n",*(p+3));
A.67
B.0
C.字符′C′的地址
D.字符′C′
第3题
以下程序段的输出结果是()。 char str[] = "BCDE",*ptr=str; cout<<*(p+4)<<end1;
A.字符E的地址
B.0
C.69
D.不确定
第4题
下面程序的输出结果是()。#include<iostream.h>
#include<string.h>
voidmain()
{
charp1[10],p2[10];
strcpy(p1,"abc");
strcpy(p2,"ABC");
charstr[50]="xyz":
strcpy(str+2,strcat(p1,p2));
cout<<str;
}
A.xyzabcABC
B.zabcABC
C.xyabcABC
D.yzabcABC
第5题
阅读下面程序,则执行后的结果是
#include "stdio.h"
main()
{char str[]="tomeetme",*p;
for(p=str;p<str+7;p+=2) putchar(*p);
printf("\n");}
A.tomeetme
B.tmem
C.oete
D.tome
第6题
有以下程序 main(){ char str [] [10]={"China", Beijing"},*p=str; printf("%s\n",p+10);} 程序运行后的输出结果是
A.China
B.Beijing
C.ng
D.ing
第7题
A.xyzabcABC
B.zabcABC
C.xyabcABC
D.yzabcABC
第8题
下面程序的输出结果是()。 #include<iostream> #include<string> using namespace std; void main(){ charp1[10],p2[10]; strcpy(p1,"abc"); strcpy(p2,"ABC"); charstr[50]="xyz"; strcpy(str+2,strcat(p1,p2)); cout<<str; }
A.xyabcABC
B.yzabcABC
C.xyzabcABC
D.zabcABC
第9题
有以下程序: #include <string.h> main() { char str[][20]={"Hello","Beijing"}*p=str; printf("%\n",strlen(p+20)); } 程序运行后的输出结果是
A.0
B.5
C.7
D.20
为了保护您的账号安全,请在“赏学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!