下列定义中p指向的地址可更改,但 * p不能够更改的是

admin2013-05-30  22

问题 下列定义中p指向的地址可更改,但 * p不能够更改的是

选项 A、const int * p;
B、int * const p;
C、const int * const p;
D、int * p;

答案A

解析 const int * p;是只能改变指针地址,int * const p;是只能改变 * p的内容,const int * const p;是指针的地址和 * p的内容都不能改变,int * p;是两者都能改变。
转载请注明原文地址:https://kaotiyun.com/show/LQNp777K
0

最新回复(0)