Home  >  Article  >  Backend Development  >  What does the pointer to a variable refer to?

What does the pointer to a variable refer to?

王林
王林Original
2020-07-07 14:34:329225browse

The pointer of a variable refers to the address of the variable. In C language, a variable is allowed to store a pointer, which is called a pointer variable. The value of a pointer variable is the address of a certain piece of data. Such data can be an array, a string, a function, or another pointer variable.

What does the pointer to a variable refer to?

#The pointer to a variable refers to the address of the variable.

(Recommended learning: C language tutorial)

Analysis:

C language uses variables to store data and functions to define a section Code that can be reused must eventually be placed in memory before it can be used by the CPU.

The CPU can only obtain the code and data in the memory through the address. During the execution process, the program will inform the CPU of the code to be executed and the address of the data to be read and written.

In C language, a variable is allowed to store a pointer. This variable is called a pointer variable. The value of a pointer variable is the address of a certain piece of data. Such data can be an array, a string, a function, or another ordinary variable or pointer variable.

The above is the detailed content of What does the pointer to a variable refer to?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn