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 ...
随机推荐
- luogu P2272 [ZJOI2007]最大半连通子图
题目描述 一个有向图G=(V,E)称为半连通的(Semi-Connected),如果满足:?u,v∈V,满足u→v或v→u,即对于图中任意两点u,v,存在一条u到v的有向路径或者从v到u的有向路径.若 ...
- uglify-js 和uglify-es
uglify-js 它不支持压缩 es6,参考github的issue It seems like uglify-js does not support es6? uglify-js在压缩代码时,遇到 ...
- react-native测试安装
!!!注意!!!:init命令默认会创建最新的版本,而目前最新的0.45及以上版本需要下载boost等几个第三方库编译.这些库在国内即便翻墙也很难下载成功,导致很多人无法运行iOS项目!!!中文网在论 ...
- 移动前端不得不了解的HTML5 head 头标签 —— Meta 标签
Meta 标签 meta标签是HTML中head头部的一个辅助性标签,它位于HTML文档头部的 <head> 和 <title> 标记之间,它提供用户不可见的信息.虽然这部分信 ...
- [TimLinux] CSS 纯CSS实现动画展开/收起功能
内容转自CSS世界,理解之后进行了简化,简化后代码: <!DOCTYPE html> <html> <head> <meta charset=utf-8 /& ...
- spring security 权限安全认证框架-入门(一)
spring security 概述: Spring Security是一个功能强大且高度可定制的身份验证和访问控制框架.它是保护基于spring的应用程序的实际标准. Spring Security ...
- 将项目部署到github的方法
GitHub是一个面向开源及私有软件项目的托管平台,因为只支持git 作为唯一的版本库格式进行托管,故名GitHub. GitHub于2008年4月10日正式上线,除了Git代码仓库托管及基本的 We ...
- Python爬虫实现抓取腾讯视频所有电影【实战必学】
2019-06-27 23:51:51 阅读数 407 收藏 更多 分类专栏: python爬虫 前言本文的文字及图片来源于网络,仅供学习.交流使用,不具有任何商业用途,版权归原作者所有,如有问 ...
- linux-touch 、mkdir、rm、pwd、which、locate、whatis
1.touch: 创建空文件,修改文件时间戳信息 atime(access time):最近访问文件内容时间 mtime(modify time):最近修改文件内容时间 ctime(change ti ...
- php数组去重、魔术方法、redis常用数据结构及应用场景
一.用函数对数组进行去重的方法 1.arrau_unique函数的作用 移除数组中重复的值. 将值作为字符串进行排序,然后保留每个值第一次出现的健名,健名保留不变. 第二个参数可以选择排序方式: SO ...