網域名稱俱樂部

網域名稱俱樂部 (https://www.domainclub.org/index.php)
-   一般軟體與網路使用討論 (https://www.domainclub.org/forumdisplay.php?f=43)
-   -   C語言指標的問題 (https://www.domainclub.org/showthread.php?t=37117)

哈啦 2014-10-08 09:09 PM

C語言指標的問題
 
題目如下:
#include <stdio.h>

int main(void){
char *c[]={"enter","new","point","first"};
char **cp[]={c+3,c+2,c+1,c};
char ***cpp=cp;

printf("%s\n",**++cpp);//point
printf("%s\n",*--*++cpp+3);//er
printf("%s\n",*cpp[-2]+3);//st
printf("%s\n",cpp[-1][-1]+1);//ew----->why?
return 0;
}

後面的紅字就是結果,前三個大致能懂,但最後一個實在不知如何得出的?有先進指導一下嗎?


所有時間均為 +8。現在的時間是 10:14 AM

Powered by vBulletin® 版本 3.8.4
版權所有 ©2000 - 2024,Jelsoft Enterprises Ltd.