text 在C中取消引用指针

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text 在C中取消引用指针相关的知识,希望对你有一定的参考价值。

Dereferencing the pointer: 

We go to the reference and we change the value at that address

For example:

char *pc;  // So 'pc' is a pointer that points to an address that stores a char.

If we do:
*pc = 'D';  // This is dereferencing the pointer 'pc'. So we go to the address where 'pc' points to, and we change the value in that address.

So here '*' is called dereference operator. It "goes to the reference" and access the data at that memory location, allowing you to manipulate it at will.

So the '*' helps you to go to that address, and change the value in that address or get the value that's stored there, or other things.

以上是关于text 在C中取消引用指针的主要内容,如果未能解决你的问题,请参考以下文章