[关闭]
@guochy2012 2014-03-10T09:50:33.000000Z 字数 488 阅读 1051

20140310

1.矩阵的乘法

矩阵转置
  1. strcpy等不要realloc

  2. 指针中包含两个信息

    1.base
    2.type

  3. void* 不能进行解引用

5

  1. struct Matrix mutl(struct Matrix *A, struct Matrix *B)
  2. {
  3. struct Matrix _ret;
  4. return _ret;
  5. }

避免结构体的复制

6

  1. void bubble_sort(struct Student *arr, int n, int (*comp)(struct Student *, struct Student *))

函数指针作为一种策略

7
不要返回局部变量的地址

  1. int *func()
  2. {
  3. int a;
  4. return &a;
  5. }

8

  1. char* func(char *_p)
  2. {
  3. _p = (char*)malloc(100*sizeof(char));
  4. printf("in function the pointer is: %p\n", _p);
  5. return _p;
  6. }

改变某一个变量 必须去传入他的指针 必须要高一个级别

9 链表的操作哪些需要传入L的指针 (哪些需要改变L本身)
究竟是改变L指向的内存,还是改变L本身

链表总结

  1. 遍历操作
    2 找第k个结点

3 插入 删除
4 头插法 tail

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注