狐狸梦见乌鸦

当坚持成为一种习惯,目标将不在遥远```
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2011年10月27日

摘要: 1.#include<stdio.h>#include<stdlib.h>char *reverse(const char *p);int main(){ char *test="anihC evoL I"; char *p=reverse(test); printf("%s",p); free(p); return 0;}char *reverse(const char *p){ char *dest=NULL; //空指针 int len=0,i; char *d=""; //d 指向一块合法的地址 whi 阅读全文

posted @ 2011-10-27 21:45 灬啊U 阅读(146) 评论(0) 推荐(0) 编辑

摘要: 1.地址访问方法:#include<stdio.h>int main(){ char str1[] = "I love china",str2[20]; int i; for (i = 0;*(a+i) != '\0';i++) { *(b+i) = *(a+i); } *(b+i) = '\0'; printf("The string str1 are :\n",a); printf("The string str2 are:"); for (i = 0;*(b+i) != '\0 阅读全文

posted @ 2011-10-27 19:30 灬啊U 阅读(269) 评论(0) 推荐(0) 编辑