若有以下程序段 char str[4][12]={ "aa","bbb","ccccc","d" } , *strp[4]; int i; for( i = 0; i< 4; i++ ) strp[i] = str[i]; 不能正

admin2019-06-14  4

问题 若有以下程序段
    char str[4][12]={ "aa","bbb","ccccc","d" } , *strp[4];
    int  i;
    for( i = 0; i< 4; i++ ) strp = str;
不能正确引用字符串的选项是

选项 A、str[0]
B、strp
C、strp[3]
D、*strp

答案B

解析 本题考查对字符数组中字符的引用。指针数组strp表示每一个数组元素都存放了一个字符串的首地址。选项B代表指针数组strp的第一个数组元素的地址,不是对字符的引用。所以选项B正确。
转载请注明原文地址:https://www.kaotiyun.com/show/biID777K
0

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