C语言中& pointer的结果是什么? [英] What is the result of &pointer in C?
本文介绍了C语言中& pointer的结果是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
以下行的结果是什么?
int* ptr;
printf("%x, %x\n", ptr, &ptr);
我知道ptr
是内存中的地址,但是&ptr
是什么?
I know that ptr
is an address in a memory, but what is &ptr
?
推荐答案
& ptr将是保存ptr的内存位置的地址.从本质上讲,它是指向指针的指针.
&ptr would be the address for the memory location that ptr is held in. Essentially it is a pointer to a pointer.
这篇关于C语言中& pointer的结果是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文