C language pointer -----------

Various IC Development Kit SDK are using the knowledge pointers, various callback list, ignorant force in ........... back side closer study

Pointer Overview

(1) the type of resource is a memory pointer address, house number synonymous
pointer variables: storage box concept

(2) C language compiler for this particular concept pointer, there are two questions:
1, has been assigned a box, the box for how much?
In 32bit systems, the pointer 4 bytes, and it does not matter what type of point
2, what is stored in the address box pointing reading method of memory is?

include<stdio.h>
int main()
{
    int a = 0x12345678
    int *p        
    p1 = &a
}
//在上面的函数中,p1是地址,而*p1是地址里面的值
//指针指向内存空间,一定要保证合法性

Pointer type modifier +

(1) const
constant, [Read Only] can not be changed, generally written as:
const char P ----- string "Hello World" "AAA"
char
const P ---------- hardware resources of the LCD graphics cache
const char * const p ------- not change anything, either address or ROM memory cache devices
(2)

Guess you like

Origin www.cnblogs.com/hyxk/p/11317640.html