gpt4 book ai didi

c - int **p 的奇怪行为?

转载 作者:太空宇宙 更新时间:2023-11-04 00:52:42 31 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
How are two-dimensional arrays formatted in memory?

int map[3][3] = {1,2,3,4,5,6,7,8,9};
int **p = map;
printf( "%d", *p+1 );

有人能告诉我为什么结果是 5 吗?如果

printf( "%d", *p+2);

结果是 9 ? (Visual C++编译)

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com