- 1
- 0
- 约2.28万字
- 约 124页
- 2018-12-31 发布于上海
- 举报
数据结构与算法设计d052013
学习之前第 页指针操作的问题未初始化就直接使用指针越界指针转移指向局部变量的指针链接信息丢失学习之前int * p; *p = 1;struct Node { int data; struct Node * next;} * p, * head, * rear;head =(struct Node *) malloc(sizeof(struct Node)); head-next = NULL;…p = (struct Node *) malloc(sizeof(struct Node));p-data = …;rear = head; while (rear-next!=null) { rear = rear-next;}rear-next = p; p-next = NULL;第 页未初始化就直接使用学习之前char c; int *p = c; *p=1;int i, array[100];int *p = array;for ( i=0;i=100;i++){ *(p+i) = i;} 第 页指针越界学习之前int i, array[100];int *p = (int *) malloc (sizeof(int) *10);…p= array+19;…free(p);第 页指针转移学习之前int * p=NULL;void f(){ int temp; p
原创力文档

文档评论(0)