Does a pointer also have any address or memory allocation?

后端 未结 5 1094
青春惊慌失措
青春惊慌失措 2020-12-31 17:46

If a pointer stores the address of a variable ... then from where do we get the pointer?

What I asked was that if we are using pointer directly, then there must be

5条回答
  •  醉梦人生
    2020-12-31 18:35

    Look at this SO post for a better understanding of pointers. What are the barriers to understanding pointers and what can be done to overcome them?

    As far as your question goes, if I understand what you want, then, basically, when you declare a pointer, you specify an address or a numeric index that is assigned to each unit of memory in the system (typically a byte or a word). The system then provides an operation to retrieve the value stored in the memory at that address.

提交回复
热议问题