C lang:Pointer and multidimensional array
Xx_Introduction
Double indrection:Address of Address;Pointer of Pointer
#Ax_Code
```
#include
int main(void)
{
int zippo[4][2] =
{
2,4,
6,8,
1,3,
5,7
};
printf(" zippo = %p, zippo + 1 = %p\n", zippo, zippo + 1);
printf(" zippo[0] = %p, zippo[0] + 1 = %p\n", zippo[0], zippo[0] + 1);
printf(" *zippo = %p, *zippo + 1 = %p\n", *zippo, *zippo + 1);
printf(" zippo[0][0] = %d\n", zippo[0][0] );
printf(" *zippo[0] = %d\n", *zippo[0] );
printf("**zippo = %d\n", **zippo );
printf(" zippo[2][1] = %d\n", zippo[2][1] );
printf("*(*(zippo+2)+1)) = %d\n",*(*(zippo +2)+1));
return 0;
}
---
zippo = 0060FEE0, zippo + 1 = 0060FEE8
zippo[0] = 0060FEE0, zippo[0] + 1 = 0060FEE4
*zippo = 0060FEE0, *zippo + 1 = 0060FEE4
zippo[0][0] = 2
*zippo[0] = 2
**zippo = 2
zippo[2][1] = 3
((zippo+2)+1)= 3
C lang:Pointer and multidimensional array的更多相关文章
- Multidimensional Array And an Array of Arrays
One is an array of arrays, and one is a 2d array. The former can be jagged, the latter is uniform. T ...
- C lang:Pointer operation
Xx_Pointer opteration Do not dereference initialized Pointers Ax_Code #include<stdio.h> int ma ...
- The correct way to initialize a dynamic pointer to a multidimensional array
From:https://stackoverflow.com/questions/18273370/the-correct-way-to-initialize-a-dynamic-pointer-to ...
- C lang:Pointer and Array
Xx_Introduction Point and Array germane. Xx_Code #include<stdio.h> #define SIZE 4 int main(voi ...
- Using pointer to access array instead of index
See example below firstly. uint8_t parity = ; uint8_t index = ; //flag gMUXTask.responseData[index++ ...
- C lang: Pointer
Ax_Terminology xa_pointer pointer is the address used to store the variable;A variable (or data obje ...
- Go: using a pointer to array
下面的不是指针指向数组,而是指针指向Slice I'm having a little play with google's Go language, and I've run into someth ...
- c pointer and array
Pointer: A pointer is a variable that contains the address of a variable. if c is a char and p is a ...
- C lang:Protect array data——Const
Xx_Introduction Use pointer translate parameter array original data will change data,and use const p ...
随机推荐
- linux下docker安装部署项目(全)
一 .系统安装 基于CentOS-7-x86_64-Minimal-1708.iso安装系统 1.2. 配置系统 1.2.1 在线更新内核版本(建议更新,旧版内核会有docker BUG) 1.2 ...
- Charles Fiddler使用
http://blog.devtang.com/2015/11/14/charles-introduction/ Charles 从入门到精通 http://www.infoq.com/cn/arti ...
- 压缩感知重构算法之IHT算法python实现
压缩感知重构算法之OMP算法python实现 压缩感知重构算法之CoSaMP算法python实现 压缩感知重构算法之SP算法python实现 压缩感知重构算法之IHT算法python实现 压缩感知重构 ...
- Java修炼——Set的子接口Vector的方法使用
Vector的方法和ArrayList相似 package com.bjsxt.Array; import java.util.Iterator; import java.util.List; imp ...
- Open-Pit Mining
Description Open-pit mining is a surface mining technique of extracting rock or minerals from the ea ...
- ThreadLocal解决了什么问题
小明所在的项目组(迭代组:一直在迭代的路上),经常会在已有接口的基础上开发一些小功能,并且前提是在保证现有用户的不受影响基础上迭代.功能迭代,在代码层面小明有1w种实现方法(吹牛的),一起来看看这次小 ...
- H5 app在真机调试的时候正常,打包成app后报错
在自己的一个用h5开发的项目中, 环境 IDE HBuilderX 打包工具 Hbuilder线上打包 开发语言 JS 现象 从一个列表进入详细页之后一直转圈圈.因为是调用系统原生的等待组件,界面无法 ...
- 文件(图片)转base64
普通图片转base64 function getBase64(url, callback){ var canvas = document.createElement('canvas'),//创建can ...
- 201871010119-帖佼佼《面向对象程序设计(java)》第十四周学习总结
博文正文开头格式:(2分) 项目 内容 这个作业属于哪个课程 https://www.cnblogs.com/nwnu-daizh/ 这个作业的要求在哪里 https://www.cnblogs.co ...
- go1.13 mod 实践和常见问题
实践建议 0,go mod 要求所有依赖的 import path 的path 以域名开头,如果现有项目转1.13的go mod 模式,且不是以域名开头则需要修改. eg: code.be.mingb ...