Initial understanding of pointers

In computer science, a pointer to an object programming language, using the address, his value is a value directly to another place in the presence of computer memory. You can find the address variable unit required, it can be said, pointing to the address variable unit. The address pointer is referred to visualize. Pointer is actually a set of types collectively. . A pointer is a variable storing the unit addresses.

In the understanding of this, I learned a computer's memory pointer and inextricably. This pointer is to visit this type of a variable number stored in the address to do, and then access the songs after the address number inside the variable value.

The int a = 10;

int *p=&a;

He is the first address by a bar through a variable address to p, then * P to access this address, go visit this address value inside.

We also learned pointer sizes are different in different bit systems int * is four bytes in thirty-two system. In sixty-four system is eight bytes.

Also know the void * memory involves only room number, room size is not design. void * can not dereference.

void * can be assigned to other types of indicators.

Null pointer: pointer is the address bits (Laid Pigment wild pointer) to zero.

Guess you like

Origin www.cnblogs.com/yuzhenghan/p/11995355.html