有以下程序: #include #include main() {charstr[][20]={"One*World","One*Dream!"},*p=str[1]; printf("%d,",strlen(p));printf("%s\n",p); }

admin2019-12-17  24

问题 有以下程序:
#include
#include
main()
{charstr[][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://jikaoti.com/ti/L5G0FFFM
0

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