SunBo

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

1. Find error

    char str1[10];

    char str2 = "0123456789"

    strcpy(str1, str2);

2. Find error

     char str1[10];

     if ( strlen(str2) <= 10 )

         strcpy(str1, str2);

3. IPC 的通讯方式 

4. C++构造函数和析构函数的调用顺序 

5. new 和 malloc 的区别

6. class 与 struct 的区别

7. Check output:

     unsigned int a = 1;

     int b = -2;

     (a+b) < 0 ? "<0":">0"

8. char *p = (char *) malloc (0), p 是NULL吗?

9. Find error

    int swap (int *a, int *b)

    {

        int *p;

        *p = *a;

        *a = *b;

        *b = *p;

    }

10. heap, stack 区别

posted on 2012-05-09 12:43  SunBo  阅读(280)  评论(0)    收藏  举报