001 -- Pointer

1- definition

A variable that contains a memory address, points to somewhere in the process’ virtual address space 

2- dereference a pointer 

#include <stdio.h>
int main(int argc, char **argv)
{
int x = 42;
int *p; // p is a pointer to an integer p = &x; // p now stores the address of x printf("x is %d\n", x);
*p = 99;
printf("x is %d\n", x);
return 0;
}

 

3- pointer acrethrim 

 

More details can be refer with the link as below_ it's very good (in chinese ):

http://blog.csdn.net/u011974987/article/details/52270018

posted @ 2017-10-05 05:00  ReedyLi  阅读(131)  评论(0编辑  收藏  举报