JonsenElizee

Software Developing Blog

"An idea is fragile . It can be killed by a scornful smile or a yawn .It can be mound down by irony and scared to death by a cold look."
"Most cultures throughout human history have not liked creative individuals .They ignore them or kill them.It is a very efficient way of stopping creativity."

------Advertising boss Charles Browe and Howard Gardner ,professor at Harvard

   :: 首页 :: 新随笔 ::  ::  :: 管理 ::
 1 int main(int argc, char* argv[])
 2 
 3     char* str[] = {"Welcome""to""Fortemedia""Nanjing"};
 4     char** ptr = str + 1;
 5     printf("ptr = %s\n"*ptr);
 6     puts("1------------------------------");
 7 
 8     str[0= (*ptr+++ 2;//*ptr 取str+1所指的指针,*ptr + 2 指向了“to”后面的'\0'。
 9     printf("ptr = %s\n"*ptr);
10     printf("str = [%s]\n", str[0]);//[]
11     puts("2------------------------------");
12 
13     str[1= *(ptr + 1);
14     printf("ptr = %s\n"*ptr);
15     printf("str = [%s]\n", str[1]);//[Nangjing]
16     puts("3------------------------------");
17 
18     str[2= ptr[1+ 3;
19     printf("ptr = %s\n"*ptr);
20     printf("str = [%s]\n", str[2]);//[jing]
21     puts("4------------------------------");
22 
23     int x = (str[2- str[1]);printf("x = %d\n", x);
24     str[3= ptr[0+ x;
25     printf("str = [%s]\n", str[3]);//[g]
26     printf("ptr[0] = %s\n", ptr[0]);
27     puts("5------------------------------");
28 
29     getchar();
30     return 0;
31 }


posted on 2010-10-15 10:07 JonsenElizee 阅读(289) 评论(0)  编辑 收藏 引用
By JonsenElizee