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

2010年3月24日

摘要: 下面一段程序,请说明输出结果:[代码]结果为6.(0x518-0x500)/sizeof(int) =60x0018/4=6 void GetMemory(char *p){ p=(char*)malloc(100);}void Test(void){ char *str = NULL; GetMemory(str); strcpy(str,"helloworld"); printf(str);}... 阅读全文
posted @ 2010-03-24 11:24 Likwo 阅读(568) 评论(0) 推荐(0) 编辑