c语言数组和指针
本帖最后由 ZWY_712 于 2022-5-2 16:58 编辑🐟c24课里的不理解
array是一个二维数组,那么array+1和*(array+1)有什么区别,为什么都是地址,不应该是array+1是得到地址,而*(array+1)是得到地址里的值吗?
按我的理解是*是解引用符,那就是把array+1里的值取出来
求各位大佬指点一下
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAABCCAYAAADt9OvrAAAEWElEQVR4nO3cW5LjKgyAYffUbCIryDaylqw0r1lJ9pCb+yldbhqBDMZI9v9VnapJ7CFyJugAxvoax3EcNupzaeM4/vz3fr+H9/s9vF6vnz8/n8/h8XgM9/t9uF6vw/l87hy53uVyGU6nk3jsQzpH00bsWOz9OefWatEm7PvXOwC0czqd6NTYFBIWurpcLr9GgkDK/94BWCZNqcL3576e237q3F4sxGDtO0F7JCxBuEYyfT1NItP3Px0od1zTfng89p4lpbHVXI/0/WG7mBIKpBFP6rxYh5GO59oPR2aWO2SP2MLPC78vbBMJKyEcIXlrfw3e44cvTAkFrTuipv3pqMFiUuiZrEiU+8QIS6H1VMPjVEbah1XSzhLXTwLbB0ZYgnB0M52+hWtLn3PC96TjufZjsZTQxFGjZ6JN3X3Fdn2x0932TvfcyCFMGtqOq/17rdsH5iBhGU1YlteugF6YEhpFogL+YtEdgBskLABuMCXcgdabX4chP4XVbIPQPF0Qe8xJaqM2PthDwtqwNfaPTROI9k6jdH7s+clUO3OS0Nz4YBNTQuM0nSk12mg5sso9R1lDWxxQ0jo+9EHC2rnW9aisT7Wsx4ffmBIm9KqHFR6zvCcrdw1SzGG5nNIyzdJn18YHm0hYgp71sMI2cp01fD2nE9Z02Nw1aD67JhnnPrs2PthDwhL0roc1N74eHTH3yNASi+La5yulooc18cEeElZC+HCyt/Z7k0aBUnJZO4mk4oNNJCyBhXpYnrVeL6ptj/Usn7hLqGClHpZ2s+Tczy6dkloaFUojNmwL1RoS1RpiUzapI+TWpFIL57nF59KpiiaO2mlQbrE/FYNmI6h2w2fpOdp/K9hAwjJaXgbAX0wJAbjBojuwstvtljx+OBxWisQfRlgL2tMi756uFXaQsBayt9vi3IVDD0wJF7D1ZJXabb7GfrXPZ+XOo97W9pGwMvb8Q+s9gqLeFkJMCSttIaHV1NNq+dgS9bYQImFFxHZ/t64btVXU27IdnzdMCSPCdYzSH12velqx90vLz/RGvS1MkbAa6VlPS1MNYal6WjnU28KSSFgRsTIoc3/42npXuXUQ6bjm2cXUCMNDR6utZ6UZYaXugIav56xbWf1OvSNhRWh+wBqt6121bt+6VD2r3AizZ3woR8KqJHWENfYnzbmD1yqWXiOJ1t93bXup+HKP5kDGXcKMJTpB6/+z1rbfOrGWxGdt1CiN2LAuysssVF4mtdM6HOnkajBpazRJ7efi0tLEqVlHisVVEkPuTl54nmYjqHbDZ+k5sfiOx2O0rQ8efpaRsBash2VxobVVTBav1QuqNZRjDWtBljpw67UrS9eK/SBhbRQJxS5GUOVYdAfgBgkLgBskLABukLAAuEHCAuAGCQuAGyQsAG6QsAC4QcIC4AYJC4AbJCwAbpCwALhBwgLgBgkLgBskLABukLAAuEHCAuAGCQuAGyQsAG6QsAC4QcIC4MY3YzEP6girOVcAAAAASUVORK5CYII= 例、二维数组A = {{1, 2, 3}, {4, 5, 6}}
A + 1 是数组{4, 5, 6}的地址,如果把这个数组记作b,那A + 1 就等同于&b
*(A + 1) 就是b,**(A + 1)才是b,也就是A,即4这个元素
页:
[1]