Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - How to define integer variables and integer pointer variables
How to define integer variables and integer pointer variables
The definition of pointer variable includes three contents:

( 1)

Pointer type description, that is, defining a variable as a pointer variable;

(2)

Pointer variable name;

(3)

The data type of the variable to which the variable value (pointer) points.

Its general form is:

Type specifier

* variable name;

Where * indicates that this is a pointer variable, the variable name is the defined pointer variable name, and the type specifier indicates the data type of the variable pointed by the pointer variable.

For example:

Internationalorganizations (same as international organizations)

* p 1;

P 1 is a pointer variable whose value is the address of an integer variable. Or p 1 points to an integer variable. As to which integer variable p 1 points to, it should be decided by the address given to p 1.

Another example is:

Internationalorganizations (same as international organizations)

* p2

/*p2 is a pointer variable to an integer variable */

flotage

* p3

/*p3 is a pointer variable */

tea

* p4

/*p4 is a pointer variable to a character variable */

It should be noted that pointer variables can only point to variables of the same type, such as P3.

You can only point to floating-point variables, not floating-point variables and character variables.