分类: IT职场
2008-12-16 09:32:02
1.二叉树标明每个节点的兄弟
2.给定n,输出1..n的所有排列
3.1个c语句检测某个数是否为2的幂
4.char *p;*p=malloc(10);是否有错
5.不用temp交换x,y的值
6.#include<> 和#include ""的区别
7.fopen("c:\newdir\file.dat","r")是否有错
8.void main()
{
void *vptr = (void*)malloc(sizeof(void));
vptr++;
}
执行结果
9.Array和List的区别
10.strcpy和strncpy的区别
11.写删除自己的程序
12.calloc,malloc区别
13.const char * p,char const *p,char* const p区别
14.merge two lists
15.get the second max of an array
16.transfer "My name is Chris" to "Chris is name My"
17.get intersection between int Array A and int Array B
18.char a[]="hello";char *p = a;
求sizeof(a),sizeof(p),strlen(a),strlen(p)
19.
void GetMemory(char* p,int size)
{
if (!p) p=new char[size];
}
char *p=null;
GetMemory(p,5);
strcpy(p,"abcd");
printf("%s\n",p);
执行结果