摘要:
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... 阅读全文