设有定义int m,n,*p;与语句“m = n;”等价的语句序列是( ).
设有定义int m,n,*p;与语句“m = n;”等价的语句序列是( ).
A p=*m n=*p
B p=*n m=*p
C p=&m n=*p
D p=&n m=*p
人气:276 ℃ 时间:2020-07-12 07:32:28
解答
答案是D
p=&n之后,指针p指向n
然后m=*p,就是把指针p指向的数(在这里就是n了)赋值给m,所以与m=n等价
推荐
- 如果有定义“int m,n=5,*p=&m;”,与m=n等价的语句是()
- 如果有定义“int m,n=5,*p=&m;”,与m=n等价的语句是:A m= * p B * p= * &n C m=&n D m=* * p.
- 设有定义:int n=0,*p=&n,**q=&p,则下列赋值语句哪个是正确的?A.p=1;B.*q=2;C.q=p;D.*p=5;
- 设有定义:int n1=0,n2,*p=&n2,*q=&n1;,以下赋值语句中与n2=n1;语句等价的是( )A*p=*q;
- 若已定义:int m=12,n=10,k;语句k=m&n;执行后k的值为()?
- Draw a circle and then ( ) one to ( ) (填括号里的)
- be interested in和be interested to的区别?(尽量详细)
- He felt ill because he ate some bad fish 的同义句
猜你喜欢