有以下程序: #include<stdio.h> #include<string.h> main() {char sfr[][20]={"One*World","One*Dream!"},*p=str[1]; printf("%d,",strlen(p))

admin2016-09-03  1

问题 有以下程序:
#include<stdio.h>
#include<string.h>
main()
{char sfr[][20]={"One*World","One*Dream!"},*p=str[1];
printf("%d,",strlen(p));printf("%s\n",p);
}
程序运行后的输出结果是(  )。

选项 A、10,One*Dream!
B、9,One*Dream!
C、9,One*World
D、10,One*World

答案A

解析 p是指向二维字符数组第二行One*Dream!的数组指针,所以长度是10,打印输出的也是该字符串。
转载请注明原文地址:https://kaotiyun.com/show/j5ID777K
0

相关试题推荐
随机试题
最新回复(0)