当前位置:网站首页>指针相关概念
指针相关概念
2022-06-12 14:42:00 【腿毛ger】
指针是什么?
1. 指针是内存中一个最小单元的编号,也就是地址
2. 平时口语中说的指针,通常指的是指针变量,是用来存放内存地址的变量
总结:指针就是地址,口语中说的指针通常指的是指针变量。
指针变量
我们可以通过&(取地址操作符)取出变量的内存真实地址,把地址可以存放到一个变量中,这个 变量就是指针变量
指针类型
int类型指针,可操作四个字节



指针类型决定了 指针进行解引用操作的时候,能够访问空间的大小(能操作几个字节)
比如: char* 的指针解引用就只能访问一个字节,而 int* 的指针的解引用就能访问四个字节。

指针加减整数 指针的类型决定了指针向前或者向后走一步有多大(距离,字节)。
边栏推荐
- Autofac浅学(2)
- 【OCR】AspriseOCR C# 英文、數字識別(中文不行)
- 【LDA】LDA主题模型笔记—主要是狄利克雷
- 启明云端分享| 通过Matter协议实例演示开关通过matter协议来做到对灯亮灭的控制
- C secret script Chapter 3 (detailed explanation of string function) (Section 2)
- [wechat applet] 6.1 applet configuration file
- Autofac初学(1)
- selenium-webdriver之断言
- Sizeof calculation space size summary
- Two methods of implementing asynchronous calling function with QT
猜你喜欢

G++ error in compiling Win32 program: undefined reference to '__ imp_ GetStockObject‘

Leader education was forced to be delisted: Softbank CMC suffered heavy losses only one year after listing

你敢信?開發一個管理系統我只用了兩天

ADB command (2) use monkey to test

启明云端分享| 通过Matter协议实例演示开关通过matter协议来做到对灯亮灭的控制

我愿称之为史上最全的深度学习面经总结(附答案详解)

新技术:高效的自监督视觉预训练,局部遮挡再也不用担心!

Printing colored messages on the console with printf

Player actual combat 22 to solve the problems of flower screen and Caton

selenium进阶
随机推荐
Mobileone: the mobile terminal only needs 1ms of high-performance backbone. You deserve it!
Junit测试中常用的断言
Module yaml error: Unexpected key in data: static_context [line 9 col 3]
And, or, not equal, operator
Ankai microelectronics rushes to the scientific innovation board: the annual revenue of 500million Xiaomi industry fund is the shareholder
[Writeup]BUU SQL COURSE1[入门级]
[OCR] aspriseocr C # English, number recognition (not Chinese)
【LDA】LDA主题模型笔记—主要是狄利克雷
[datetmeformatter] realize the conversion between localdatetime and text
[system. Currenttimemillis()] current timestamp: the number of milliseconds that have elapsed since the current system time was 0:00:00 on January 1, 1970
Reverse the encryption parameters of a hot water software
Player practice 20 unpacking thread
C secret script Chapter 1: data storage (in-depth analysis)
Huawei equipment is configured with H virtual private network
Visual positioning guidance system for industrial manipulator (robot)
C secret script Chapter 1: data storage (in-depth analysis) supplement
Thinking: what is asynchrony and thread safety
Three common methods of C language array initialization ({0}, memset, for loop assignment) and their principles
jenkins的RPC测试项目
MySQL index and view