问题
单项选择题
下列程序的输出结果为 #include<iostream.h> void main() {char*a[]={"hello","the","world"};char**pa=a;pa++;cout<<*pa<<end1; }
A.hello
B.the
C.world
D.hello the world
答案
参考答案:A
解析: 本题考查的是字符数组的初始化,选项B)中用3个元素初始化大小为2的数组,越界了;选项C)中应该是2行3列的数组,题中使用3行2列初始化;选项D)中数组合后应用方括号。