摘要: int main(){ char *ptr; // alloc a memory area. ptr = (char*)malloc(10); free(ptr); // alloc an array. ptr = (char*)calloc(10, 1); printf("%u\n", (unsigned)ptr); // realloc. ptr = (char*)realloc(ptr, 20); printf("%u\n", (unsigned)ptr); free(ptr); return 0;} re... 阅读全文
posted @ 2011-11-01 11:06 GG大婶 阅读(349) 评论(0) 推荐(0) 编辑